1
SqlCeConnection conn =
   new SqlCeConnection(@"Data Source= " + (System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase) + "\\ITIA.sdf;Persist Security Info=False;"));
conn.Open();

this is my code and it is showing me the following error:

The file name is not valid. Check the file name for the database. [ File name = file:\C:\Users\Prash\documents\visual studio 2010\Projects\ITIA\ITIA\bin\Debug\ITIA.sdf ]

but in the folder the database is saved as ITIA.

I want to publish my windows form application so that the client can enter data which can be stored in a database.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459

0 Answers0