Click here to Skip to main content
15,896,512 members
Home / Discussions / Database
   

Database

 
QuestionHow to get an ID of the last inserted row of a table Pin
makumazan845-Sep-08 2:54
makumazan845-Sep-08 2:54 
AnswerRe: How to get an ID of the last inserted row of a table Pin
Blue_Boy5-Sep-08 3:18
Blue_Boy5-Sep-08 3:18 
GeneralRe: How to get an ID of the last inserted row of a table Pin
makumazan845-Sep-08 4:55
makumazan845-Sep-08 4:55 
GeneralRe: How to get an ID of the last inserted row of a table Pin
Blue_Boy5-Sep-08 5:00
Blue_Boy5-Sep-08 5:00 
GeneralRe: How to get an ID of the last inserted row of a table Pin
Ashfield5-Sep-08 9:24
Ashfield5-Sep-08 9:24 
GeneralRe: How to get an ID of the last inserted row of a table Pin
Blue_Boy5-Sep-08 9:26
Blue_Boy5-Sep-08 9:26 
AnswerRe: How to get an ID of the last inserted row of a table Pin
nelsonpaixao7-Sep-08 12:37
nelsonpaixao7-Sep-08 12:37 
Questionsql server mobile edtion connectivity with windows mobile 5.0 application problem Pin
manish.singhal5-Sep-08 2:33
manish.singhal5-Sep-08 2:33 
hi to all,

i am making an application using windows mobile 5.0 sdk and connecting to sql server mobile edition ........i made the .sdf file using sql server management studio and kept in my application directory ............


string strAppWorkingDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase);

string connstr = "Data Source=" + strAppWorkingDir + @"\" + "sample.sdf; Persist Security Info=False;";

string connstr = "Data Source=C:\\Documents and Settings\\IT\\sample.sdf; Persist Security Info=False;";

string connstr = "PROVIDER=Microsoft.SQLServer.OLEDB.CE.3.0; Data Source=C:\\Documents and Settings\\IT\\sample.sdf";

string connstr = "Data Source =." + @"\" + "sample.sdf;" ;

SqlCeConnection conn = new SqlCeConnection(connstr);

SqlCeDataAdapter adapter = new SqlCeDataAdapter("select * from table1",conn);

DataSet dst = new DataSet();

adapter.Fill(dst);

textBox3.Text = dst.Tables[0].Rows[0].ItemArray[0].ToString();


i have tried all these connection string but most of the time i am getting an error :-


An unhandled exception of type 'System.Data.SqlServerCe.SqlCeException' occurred in System.Data.SqlServerCe.dll

Additional information: The database file cannot be found. Check the path to the database. [ File name = .\sample.sdf ]


although it is working when connect with wizard ...............................as it keep connections in .xsd........

please can anyone help me out how to connect to .sdf file..............................................

Thanks & Regards
Manish Singhal
Software Engineer
Maxworth systems(Delhi)

AnswerRe: sql server mobile edtion connectivity with windows mobile 5.0 application problem Pin
Blue_Boy5-Sep-08 3:22
Blue_Boy5-Sep-08 3:22 
GeneralRe: sql server mobile edtion connectivity with windows mobile 5.0 application problem Pin
manish.singhal6-Sep-08 2:29
manish.singhal6-Sep-08 2:29 
Questiontime out expired Pin
brettokumar4-Sep-08 21:12
professionalbrettokumar4-Sep-08 21:12 
AnswerRe: time out expired Pin
Blue_Boy4-Sep-08 21:38
Blue_Boy4-Sep-08 21:38 
AnswerRe: time out expired Pin
Paddy Boyd4-Sep-08 23:54
Paddy Boyd4-Sep-08 23:54 
AnswerRe: time out expired Pin
Ashfield5-Sep-08 1:16
Ashfield5-Sep-08 1:16 
Questiondymanic sql query Pin
nelsonpaixao4-Sep-08 12:42
nelsonpaixao4-Sep-08 12:42 
AnswerRe: dymanic sql query Pin
Blue_Boy4-Sep-08 13:25
Blue_Boy4-Sep-08 13:25 
GeneralRe: dymanic sql query Pin
nelsonpaixao4-Sep-08 13:45
nelsonpaixao4-Sep-08 13:45 
GeneralRe: dymanic sql query Pin
Blue_Boy4-Sep-08 13:46
Blue_Boy4-Sep-08 13:46 
QuestionRe: dymanic sql query Pin
nelsonpaixao5-Sep-08 13:26
nelsonpaixao5-Sep-08 13:26 
QuestionLastModifiedDate Pin
geekfromindia4-Sep-08 9:06
geekfromindia4-Sep-08 9:06 
AnswerRe: LastModifiedDate Pin
Wendelius4-Sep-08 9:45
mentorWendelius4-Sep-08 9:45 
GeneralRe: LastModifiedDate Pin
geekfromindia4-Sep-08 9:47
geekfromindia4-Sep-08 9:47 
GeneralRe: LastModifiedDate Pin
Wendelius4-Sep-08 10:12
mentorWendelius4-Sep-08 10:12 
GeneralRe: LastModifiedDate Pin
geekfromindia4-Sep-08 11:36
geekfromindia4-Sep-08 11:36 
GeneralRe: LastModifiedDate Pin
Wendelius4-Sep-08 11:41
mentorWendelius4-Sep-08 11:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.