Please quickly help?

there is an error in my code but i don't know where i'm using pocket pc 2003 with visual studio 2005 beta 2 and sql server 2005, i create database as sql server mobile database (mydb.sdf) and connet it with my application, the when i insert new row.

the error message:
An unhandled exception of type 'System.Data.SqlServerCe.SqlCeException' occurred in System.Data.SqlServerCe.dll

Additional information: The path is not valid. Check the directory for the database. [ Path = C:\Documents and Settings\User\my documents\visual studio 2005\Projects\DeviceApplication1\DeviceApplication1\db2.sdf ]

[646 byte] By [TheBlackhorse] at [2007-12-16]
# 1

Sounds to me as though you are attempting to run this on a device. The path "C:\Documents and Settings\User\my documents\visual studio 2005\Projects\DeviceApplication1\DeviceApplication1\db2.sdf" will not exist on your device, you will need to change this in your connection string.

ScottBAldwin at 2007-9-9 > top of Msdn Tech,Smart Device Development,.NET Compact Framework...
# 2
thank you
TheBlackhorse at 2007-9-9 > top of Msdn Tech,Smart Device Development,.NET Compact Framework...
# 3
I've got the same error, however the path is [ Mobile Device \Program Files\MyDB\jobs.sdf] I checked my connection strings, seems correct... plz help
Zuki at 2007-9-9 > top of Msdn Tech,Smart Device Development,.NET Compact Framework...
# 4
shange the path to \Program Files\MyDB\jobs.sdf, you don't need the Mobile Device bit
Anarchy at 2007-9-9 > top of Msdn Tech,Smart Device Development,.NET Compact Framework...
# 5

try this one...

/// <summary>
/// Holds Connection String for Database
/// </summary>

string Con = "Data Source = \\My Documents\\Sample.sdf";

tamtaly at 2007-9-9 > top of Msdn Tech,Smart Device Development,.NET Compact Framework...