I copied over some code from a test app:
const string sdfPath = @"C:\WebAPIClient\WebAPIClient\bin\Debug\DBPlatypusCompactDB.sdf";
string dataSource = string.Format("Data Source={0}", sdfPath);
int countAdded = 0;
if (!File.Exists(sdfPath))
. . .
...which works fine there; but on trying to convert it for use in the project that will run on the Windows CE device:
const string sdfPath = @"Computer\WindowsCE\\\Program Files\hhs\DBPlatypusCompactDB.sdf";
. . .
...(this is the path I copied from Windows Explorer (the folder to which the exe is deployed, which has no subfolders)), I get "path not found" or "path not valid" or something similar.
How am I to designate the path?
It's not really clear what you're trying to do, so here are some general pointers:
\
) character.\Program Files\hhs\mydatabase.sdf
My Device\Program Files\foo.bar
is not a path resolvable by any File APIs on the desktop. If you want to access a device file from a PC app, you must use something like RAPI to pull the file locally, then use the local copy