Click here to Skip to main content
15,902,112 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am working on a project for the company where I should be able to save a customers information to the database and load it with the rest. What happens is that I put in the information, saves in the datatable, but doesn't save to the database. Now one would say there's something wrong with the code, but here's the pain: I'm using VS2008 and SQL2005 and facing this issue. However, my coworker is using SQL2008 and yet the code is working perfectly on his machine. What is the problem and how can I solve it? Thank you

Without any more information, it's merely guessing, but few things you should try:
- using debugger go through the code and check that the insert is actually executed and no error is generated
- check that you're using the correct database
- if the database is attached when the application runs, check that compiling doesn't overwrite the database files
- check that transactions are committed before closing the connection
- and if you have standard or enterprise edition of Sql Server, use Profiler to see what's happening on the Sql Server side.
Share this answer
Hello friend....!!!

If your code is work perfectly on your coworkers system then something wrong on your system...
Share this answer
Like what exactly could it be? I have VS2008 and SQL2005 SP4 installed.
Share this answer

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