Help with locating database

  • Thread starter Thread starter sats2059
  • Start date Start date
S

sats2059

Hey Everybody,

I am running a C#code that creates a database called Mobile.sdf

SqlCeEngine engine = new SqlCeEngine ("Data Source = Mobile.sdf");
engine.CreateDatabase ();

Now I am not able to locate the actual database on my PC. Where will
this be stored?

Thanks
Sats
 
Using that string it should be in the root folder on your device "\". If you
want to create it in a specific place you must use a full path - Windows CE
has no concept of current directory.

Peter
 
Hi Sats,

Look in your root '/', aka "My Device". If you would like to create it
in a specific location, just specify it:

SqlCeEngine engine = new SqlCeEngine(@"Data Source = '\Program
Files\DeviceApplication1\Mobile.sdf'");

hth,
Nino
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top