PC Review


Reply
Thread Tools Rate Thread

DataAdapter Insert Command changes for no reason

 
 
Carlos Kirkconnell
Guest
Posts: n/a
 
      18th May 2004
I have dataset which has many changes performed by the user using a grid. I
previously built a DataAdapter using a commandbuilder. The commands built in
the data adapter are correct. But something strange happens when I update
the dataset. It seems that the insert command is changed during the call to
the update method in the dataAdapter. Previous to calling the update method,
the insertcommand is correct, but after the update command is generated, an
exception happens, and the insertcommand command text is changed in such a
way that some of the fields that form part of the primary key are missing,
which means that ado is trying to insert the a null value to the database.
Any idea of what is happening?
help will be really appreaciated.


 
Reply With Quote
 
 
 
 
Mohamoss
Guest
Posts: n/a
 
      24th May 2004
hi Carlos
Two thing i think of might be the reason of what you are noticing. did you
create your adaptor object using the code or did you use the visual
interface . if you used the second then it might be the reason so try to
remove that one and add it from code yourself . The other reason might be
that you are using some command builder object somewhere (or it may be
added to you if you use server explorer for example to create your adaptor
object).
Mohamed Mahfouz
MEA Developer Support Center
ITworx on behalf of Microsoft EMEA GTSC

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DataAdapter changes insert-command at Update Patrick Microsoft ADO .NET 3 12th Dec 2006 06:42 PM
DataAdapter.Update calling Insert Command with DbNull values =?Utf-8?B?bWlzZml0ODE1?= Microsoft ADO .NET 2 18th Jan 2006 12:49 PM
Refresh update, select, and insert command parameter lengths in a dataadapter... hyper_x_43@yahoo.com Microsoft ADO .NET 4 10th Jan 2005 06:54 PM
Refresh update, select, and insert command parameter lengths in a dataadapter... Hyper X Microsoft C# .NET 6 10th Jan 2005 05:48 AM
Configure DataAdapter Changes the Name of a Column in Insert Command =?Utf-8?B?bWljaGFlbA==?= Microsoft ADO .NET 2 19th Feb 2004 06:52 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:29 AM.