Referring post : C# – ExecuteNonQuery() isn't working with SQL Server CE
I have the same problem with an attached Access Database to my Project and indeed i try to Insert records but all in vain, it tells me that it’s inserted but no records found..
Well the above post discussed the problem and its cause but i want to know more about the solution… How Can i Solve this problem???
Best Regards,
Baher.
I think I found out the Solution , after searching for sometime i did the following changes:
1- In the Solution Explorer I changed the property of my database which is
Copy to Output Directory : always
To
Copy to output Directory : Do not Copy
2- In the Serve Explorer i right clicked my database and modified the Connection to it to the database which exists in my bin folder.
That’s it…
Hope that it helps