Click here to Skip to main content
15,888,313 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi everyone!

I am trying to implement inserting capabilities into my project to be able to insert new records into the database. I currently have the connection string to be the hard-coded string where the sql server compact sdf file is located. When I change it to "|Data Directory|\\db.sdf" the inserts do not work. They do work with the hard-coded path name. Is there a special place that the "|Data Directory|" command looks at to locate the .sdf file? I know the connection string is the problem since it works with the hard-coded path.

Thanks everyone!
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900