Storage Card in csharp smart device
-
Good Morning everybody, I develop a csharp smart device application.I am in the step of the connection to my local database .sdf.As I read,I should add this .sdf file to my emulator using a shared folder.I did as below: 1-sharing my file C:\Users\Admin\Documents\Visual Studio 2008\Projects\GMAOMobile 2-in the visual studio,go to Tools->connect to device 3-in the device tool,Menu File->configure... 4-I add the shared file in the shared folders icon. Running another time,the problem still the same:cannot found the path of the database. I read more.I found that I can refer to my database using the storage card.But I can't Copy the DB (the sdf file) from the pc to the storage card, and, and refer to it as \\Storage card\GMAOMobile.sdf. Any help will be very grantful Regards
-
Good Morning everybody, I develop a csharp smart device application.I am in the step of the connection to my local database .sdf.As I read,I should add this .sdf file to my emulator using a shared folder.I did as below: 1-sharing my file C:\Users\Admin\Documents\Visual Studio 2008\Projects\GMAOMobile 2-in the visual studio,go to Tools->connect to device 3-in the device tool,Menu File->configure... 4-I add the shared file in the shared folders icon. Running another time,the problem still the same:cannot found the path of the database. I read more.I found that I can refer to my database using the storage card.But I can't Copy the DB (the sdf file) from the pc to the storage card, and, and refer to it as \\Storage card\GMAOMobile.sdf. Any help will be very grantful Regards
Tunisien86 wrote:
But I can't Copy the DB
It would be helpfull if you stated why you can't copy the file. Did you receive an error? It might be easier if you copy the CE-database to a shared folder on your device, as opposed to reading it from an occasionally-connected-drive. I suggest you dive into the documentation[^].
I are Troll :suss:
-
Tunisien86 wrote:
But I can't Copy the DB
It would be helpfull if you stated why you can't copy the file. Did you receive an error? It might be easier if you copy the CE-database to a shared folder on your device, as opposed to reading it from an occasionally-connected-drive. I suggest you dive into the documentation[^].
I are Troll :suss:
Hi, I really fed up with this sqlceexception"the path to the database not found?"when googling,I found this link that deals with the same problem http://social.msdn.microsoft.com/Forums/en/netfxcompact/thread/203b5e98-15df-4c66-8200-66716285b032[^]But when following the same steps,i still getting this exception Plzzzzzzzzzzz help me I am really getting crazy Regards
-
Hi, I really fed up with this sqlceexception"the path to the database not found?"when googling,I found this link that deals with the same problem http://social.msdn.microsoft.com/Forums/en/netfxcompact/thread/203b5e98-15df-4c66-8200-66716285b032[^]But when following the same steps,i still getting this exception Plzzzzzzzzzzz help me I am really getting crazy Regards
Tunisien86 wrote:
Plzzzzzzzzzzz help me I am really getting crazy
Save your SqlCe database on the SmartDevice itself, and point your connectionstring to it. That's also what's been suggested as an answer in the post that you are referring to;
conn = @"Data Source=\Program files\smartdeviceproject1\firstaid.sdf";
As you can see, there's no C:\ drive on a smart device. Your app will be deployes domewhere in the "Program Files" folder. I suggest you share that folder and copy your file there, and update your connectionstring accordingly.
I are Troll :suss:
-
Tunisien86 wrote:
Plzzzzzzzzzzz help me I am really getting crazy
Save your SqlCe database on the SmartDevice itself, and point your connectionstring to it. That's also what's been suggested as an answer in the post that you are referring to;
conn = @"Data Source=\Program files\smartdeviceproject1\firstaid.sdf";
As you can see, there's no C:\ drive on a smart device. Your app will be deployes domewhere in the "Program Files" folder. I suggest you share that folder and copy your file there, and update your connectionstring accordingly.
I are Troll :suss:
Hi This is the link which solved my problem: http://social.msdn.microsoft.com/Forums/en-US/vssmartdevicesvbcs/thread/0f32993e-5b16-43b4-b7b6-09a3f66eb2f2/[^] Thanks