Click here to Skip to main content
15,896,111 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Commandbuilder fails Pin
Mycroft Holmes10-Sep-08 22:03
professionalMycroft Holmes10-Sep-08 22:03 
GeneralRe: Commandbuilder fails Pin
nitin_ion10-Sep-08 22:46
nitin_ion10-Sep-08 22:46 
GeneralRe: Commandbuilder fails Pin
Mycroft Holmes10-Sep-08 22:52
professionalMycroft Holmes10-Sep-08 22:52 
AnswerRe: Commandbuilder fails Pin
Dave Kreskowiak11-Sep-08 1:45
mveDave Kreskowiak11-Sep-08 1:45 
GeneralRe: Commandbuilder fails Pin
nitin_ion11-Sep-08 1:54
nitin_ion11-Sep-08 1:54 
GeneralRe: Commandbuilder fails Pin
Dave Kreskowiak11-Sep-08 3:33
mveDave Kreskowiak11-Sep-08 3:33 
GeneralRe: Commandbuilder fails Pin
nitin_ion11-Sep-08 18:34
nitin_ion11-Sep-08 18:34 
GeneralRe: Commandbuilder fails Pin
Dave Kreskowiak12-Sep-08 1:41
mveDave Kreskowiak12-Sep-08 1:41 
If all this method is doing is writing changed data back to the database, why are you getting a set of records using an SQL, only to replace some of those records and write the whole thing back to the database. This is very inefficient.

Skip this step entirely and just write the dataset your passing into this function to the database. From what I've read in the code, there is no reason at all to retrieve a new dataset first and merge the passed in set into it.

Now, onto why the commandbuilder fails. If the SQL statement does not return the primary key of a table, it will fail. If you pass in an SQL statement that does joins, it will fail. CommandBuilder will only work with SQL that returns a single, keyed, non-joined table.


A guide to posting questions on CodeProject[^]



Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007, 2008




QuestionImage in Crystal Report at runtime Pin
anshul soni10-Sep-08 19:56
anshul soni10-Sep-08 19:56 
QuestionOpening files in fileListBox Pin
annir10-Sep-08 17:21
annir10-Sep-08 17:21 
AnswerRe: Opening files in fileListBox Pin
C1AllenS10-Sep-08 21:13
C1AllenS10-Sep-08 21:13 
AnswerRe: Opening files in fileListBox Pin
jzonthemtn11-Sep-08 6:30
jzonthemtn11-Sep-08 6:30 
QuestionIs it possible to check for x32 vs x64 processors in vb6? Pin
Jon_Boy10-Sep-08 9:49
Jon_Boy10-Sep-08 9:49 
AnswerRe: Is it possible to check for x32 vs x64 processors in vb6? Pin
jzonthemtn10-Sep-08 10:02
jzonthemtn10-Sep-08 10:02 
GeneralRe: Is it possible to check for x32 vs x64 processors in vb6? Pin
Jon_Boy11-Sep-08 3:06
Jon_Boy11-Sep-08 3:06 
QuestionHow to code dns lookup application using VB.net 2008? [modified] Pin
rakyomin10-Sep-08 8:46
rakyomin10-Sep-08 8:46 
AnswerRe: How to code dns lookup application using VB.net 2008? Pin
rakyomin10-Sep-08 10:00
rakyomin10-Sep-08 10:00 
GeneralRe: How to code dns lookup application using VB.net 2008? Pin
Johan Hakkesteegt10-Sep-08 20:01
Johan Hakkesteegt10-Sep-08 20:01 
AnswerRe: How to code dns lookup application using VB.net 2008? Pin
rakyomin11-Sep-08 4:25
rakyomin11-Sep-08 4:25 
QuestionBest logging/tty (teletype-style) output control? Pin
supercat910-Sep-08 6:59
supercat910-Sep-08 6:59 
AnswerRe: Best logging/tty (teletype-style) output control? Pin
jzonthemtn10-Sep-08 7:47
jzonthemtn10-Sep-08 7:47 
GeneralRe: Best logging/tty (teletype-style) output control? Pin
supercat910-Sep-08 9:54
supercat910-Sep-08 9:54 
Questionmultiple parameters in thread Pin
Nilish10-Sep-08 6:46
Nilish10-Sep-08 6:46 
AnswerRe: multiple parameters in thread PinPopular
Christian Graus10-Sep-08 7:08
protectorChristian Graus10-Sep-08 7:08 
AnswerRe: multiple parameters in thread Pin
Mycroft Holmes10-Sep-08 15:45
professionalMycroft Holmes10-Sep-08 15:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.