Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C# 2005 > C# 2005
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
C# 2005 For discussion of Visual C# 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2005 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 16th, 2006, 09:31 PM
Registered User
 
Join Date: Jan 2006
Location: singapore, singapore, Singapore.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default unable to save to SQL database

No sure if anyone else is having this problem but i can't seems to save to the sql sqldatabase when i use the tableadapter.insert & update it is display to the datagridview but once i close the whole program and open the sql database the data is gone.... anyone can help?

  #2 (permalink)  
Old February 8th, 2006, 08:28 AM
Registered User
 
Join Date: Feb 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

what order are you calling only the update command. showing some code might help. be sure you are referencing the right dataset/datatable as the parameter.

  #3 (permalink)  
Old February 14th, 2006, 06:00 AM
Registered User
 
Join Date: Feb 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yeah, it doesn't work for me either, and the code is 100% correct. I've show it to experts and the code works on other peoples machines. I'm not sure why, but on some peoples machines, it simply doesn't work.

  #4 (permalink)  
Old February 20th, 2006, 06:11 PM
Registered User
 
Join Date: Feb 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I think your problem is the following;

When you run / debug an application the database is by default copied to the output directory. Any data updated by your application is updated in that copy of the .mdf file. When you exit the application and go back to the project window you are working with the original database, prior to edits by your program. The next time you run the program, the database is again over-written as part of the compile process.

  #5 (permalink)  
Old July 31st, 2006, 05:33 AM
Registered User
 
Join Date: Jul 2006
Location: Jinja, Uganda, Uganda.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I just read this topic recently and it's one of the problems I am facing as a new .Net programmer. So what is the solution to this? How can the changes in the copy of the .mdf directory be transmitted to the original database in real time such that the inserted data at runtime can be seen in the tables after debugging? In fact I am experiencing this problem only with the windows application. The database works just fine with my ASP.Net Applicaition

 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
i cannot save to my database knightneo Beginning PHP 3 January 29th, 2007 08:06 AM
Unable to save Excel with macro on server guptasourav Classic ASP Basics 0 January 17th, 2007 05:21 AM
save database kim VB How-To 3 April 2nd, 2006 09:26 AM
Save simple record via web form t sql database kbarsi VB Databases Basics 1 January 30th, 2005 11:29 AM



All times are GMT -4. The time now is 08:56 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.