i place values in a new row programatically . it has an auto-increment column. after adding the entries i do...
bindingsource.e ndedit()
tableadapter.up date(dataset.da tatable)
the saving process has no problem. now, i want to get the value of the new record's auto-increment column. if i do this...
textbox.text = directcast(bind ingsource.curre nt,datarowview) ("Auto")
it will generate an error, nullreferenceex ception was unhandled, Object reference not set to an instance of an object. and when i point the cursor to the bindingsource.c urrent line in debugmode, bindingsource.c urrent = nothing.
how can i get the value in the auto-increment column of the newly added record.
bindingsource.e ndedit()
tableadapter.up date(dataset.da tatable)
the saving process has no problem. now, i want to get the value of the new record's auto-increment column. if i do this...
textbox.text = directcast(bind ingsource.curre nt,datarowview) ("Auto")
it will generate an error, nullreferenceex ception was unhandled, Object reference not set to an instance of an object. and when i point the cursor to the bindingsource.c urrent line in debugmode, bindingsource.c urrent = nothing.
how can i get the value in the auto-increment column of the newly added record.
Comment