Click here to Skip to main content
15,922,155 members
Home / Discussions / Database
   

Database

 
QuestionAdd a new object or string while running through a recordset [modified] Pin
Tugsy6-Sep-08 18:56
Tugsy6-Sep-08 18:56 
AnswerRe: Add a new object or string while runnign through a recordset Pin
Wendelius7-Sep-08 9:06
mentorWendelius7-Sep-08 9:06 
GeneralRe: Add a new object or string while runnign through a recordset Pin
Tugsy7-Sep-08 10:56
Tugsy7-Sep-08 10:56 
QuestionJob Schedule Pin
Saiyed Alam6-Sep-08 6:23
Saiyed Alam6-Sep-08 6:23 
AnswerRe: Job Schedule Pin
Wendelius6-Sep-08 9:02
mentorWendelius6-Sep-08 9:02 
GeneralRe: Job Schedule Pin
Saiyed Alam8-Sep-08 5:17
Saiyed Alam8-Sep-08 5:17 
GeneralRe: Job Schedule Pin
Wendelius8-Sep-08 6:01
mentorWendelius8-Sep-08 6:01 
QuestionDate Format Pin
ThangamSundar5-Sep-08 21:56
ThangamSundar5-Sep-08 21:56 
AnswerRe: Date Format Pin
Blue_Boy5-Sep-08 23:57
Blue_Boy5-Sep-08 23:57 
AnswerRe: Date Format Pin
PIEBALDconsult8-Sep-08 18:07
mvePIEBALDconsult8-Sep-08 18:07 
Questionspecify the name space returned from "FOR XML, XMLDATA" Pin
ONeil Tomlinson5-Sep-08 4:13
ONeil Tomlinson5-Sep-08 4:13 
AnswerRe: specify the name space returned from "FOR XML, XMLDATA" Pin
Wendelius6-Sep-08 9:09
mentorWendelius6-Sep-08 9:09 
QuestionSQL 2008 Uniqueidentifier Pin
JUNEYT5-Sep-08 4:07
JUNEYT5-Sep-08 4:07 
AnswerRe: SQL 2008 Uniqueidentifier Pin
PIEBALDconsult5-Sep-08 13:24
mvePIEBALDconsult5-Sep-08 13:24 
QuestionLoss of data from MS Access Database while running tests Pin
Pr@teek B@h!5-Sep-08 3:31
Pr@teek B@h!5-Sep-08 3:31 
AnswerRe: Loss of data from MS Access Database while running tests Pin
Blue_Boy5-Sep-08 3:37
Blue_Boy5-Sep-08 3:37 
GeneralRe: Loss of data from MS Access Database while running tests Pin
Pr@teek B@h!8-Sep-08 4:29
Pr@teek B@h!8-Sep-08 4:29 
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)

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.