0

i am getting a problem during oledbdataadapter update at runtime

my code is like this

con.open();

oledbdataadapter oda=new oledataadapter(commandtext,con)  // first dataadapter

dataset ds=new dataset();

oda.fill(ds,"labs");

for(  some condition)

{   string commandtext2="bla-bla";
    oledbdataadapter oda2=new oledataadapter(commandtext2,con)  // second dataadapter

     dataset ds2=new dataset();
     oda2.fill(ds2,"class");
     cmd.commandtext="sql statement";
     oda2.fill(ds2,"subjects");
     
     my code logic here

   oledbCommandBuilder cmdbuild=new oledbCommandBuilde(oda2);
 ***  [B] oda2.update(ds2,"class");[/B]
    oda2.update(ds2,"subjects");
}
   oledbCommandBuilder cmdbuild2=new oledbCommandBuilde(oda);
oda.update(ds,"labs");
con.close();

I'm getting an error at runtime as "concurrency conflict: updated 0 rows instead of expected 1 rows" at the line *** starred.

so pls help me

Edited by __avd: Added [code] tags.

2
Contributors
1
Reply
2
Views
5 Years
Discussion Span
Last Post by lolafuertes
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.