Answered by:
unable to insert data into database for windows mobile application

Question
-
Hi,
we have developed a windows mobile6 application using c# and database is sqlserver compact edition ;
we have created the database as per the process mentioned in msdn. the issue is we are unable to insert the data into the database from the emulator . if we enter the data manually the data is getting stored into the tables. but if we enter by running the application. ie from emulator data is not getting stored in tables which we have created. even the connection to the database from application is working well.
important issue : after entering the data from emulator(i.e after running the application) data is not stored in the tables what we have created (this we can say because after entering the data and when we verify the table data in the database this data is not present,) but when we try to retrieve the same data we are able to retrieve it (this data is only retrieved for that particular time only if we close the application and run it again the data is lost)
Q. where this data is getting stored and why it is not stored in database
will be thankful to anyone who can send a answer to this issue
Thanking you
shashidhar
Monday, December 29, 2008 9:52 PM
Answers
-
Data is stored in the database on device (or emulator) located on device file system. Most common issue with data not showing up is what data is checked in the original unchanged copy of the database on the desktop. Please make sure you're checking data in the changed copy on the device. Also if you have VS configured to deploy the database with your project, make sure it's not configured to overwrite changed copy with original unchanged one - or all your changed would be lost.
This posting is provided "AS IS" with no warranties, and confers no rights.- Proposed as answer by ErikEJMVP Wednesday, December 31, 2008 10:38 AM
- Marked as answer by Guang-Ming Bian - MSFT Thursday, January 22, 2009 7:22 AM
Tuesday, December 30, 2008 5:26 AM
All replies
-
How about some of your code to show what is going on in your application? Do you copy a database to the emulator or does your program create it? If it creates it, please provide that block of code as well as your code to access the database.
Also what MSDN article are you referring to?Monday, December 29, 2008 11:03 PM -
Data is stored in the database on device (or emulator) located on device file system. Most common issue with data not showing up is what data is checked in the original unchanged copy of the database on the desktop. Please make sure you're checking data in the changed copy on the device. Also if you have VS configured to deploy the database with your project, make sure it's not configured to overwrite changed copy with original unchanged one - or all your changed would be lost.
This posting is provided "AS IS" with no warranties, and confers no rights.- Proposed as answer by ErikEJMVP Wednesday, December 31, 2008 10:38 AM
- Marked as answer by Guang-Ming Bian - MSFT Thursday, January 22, 2009 7:22 AM
Tuesday, December 30, 2008 5:26 AM