User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 397,866 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,590 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting

Error connecting to database

Join Date: Nov 2005
Posts: 23
Reputation: Reham Ejaz is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
Reham Ejaz Reham Ejaz is offline Offline
Newbie Poster

Re: Error connecting to database

  #10  
Feb 1st, 2006
Originally Posted by f1 fan
You misunderstood that. The data adapter sees the rows that have been changed (it actually iterates through each table and checks the row state) and depending on whether the row state is one of added, modified or deleted it calls the appropriate command to do the work.
If you take a step back to think about it... it is impossible for the command to know which value you want to go where. It knows nothing about your database (it only knows to pass some string to the database - the command does not execute it nor check it - you could have set the string as "send me ten million us dollars and a pizza" and it would only fail when you tried to execute it (the database would fail not the command)). So you have to tell it. Trust me, i have been doing this for a long time and spend a lot of time writing each of the stored procs for SQL (well i dont - i have written a generator, but the generator spends a lot of time writing them and i spend a lot of time telling the adapter each one).

You have to write it. Humor me and try it.

But It did work. I mean the code I have given. The only problem now is that its working with some tables but not with all. I dont know what's the problem. I have made a table with personal user entries and its working fine. But when I make a new table with all the entries along with tour details. It gives an error on the update statement as I mentioned earlier. If it works with 1 table it should work with all. I have even tried using insert statement but it gives an error indicating syntax error in insert into statement the same error i get in update statement. Can u help me with that.
Reply With Quote  
All times are GMT -4. The time now is 8:56 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC