N
Nisha
I am having a problem with my dataset update.
My form has the following:
A couple of text boxes and a listbox.
I have a strongly typed dataset on my form and dataadapter which has only an
Select / Update commands. Both the select and update commands have the
command.text property set to a stored proc. The select works nicely and
retrieves multiple rows in the listbox. As all the controls are bound to
columns within the same dataset, clicking on the listbox item scrolls to the
right row and the text boxes display the correct values. In short there is
no binding manager used... but the listbox does it automatically.
Below is the following code that is executed when I click on the save
button.
dim irow as integer = lisbox1.selectedindex
dim rowstatus = ds_regulatory.tables(0).rows(irow).rowstate()
At this point the value of rowstatus is "unchanged" although I am expecting
it to be "modified"
If ds_regulatory.haschanges() then
adapter_reg.Update(ds_regulatory)
endif
At this point when I check the sqlProfiler ( SQL tracking tool for MS
SQLServer), to see if the stored proc has gotten fired.... it hasn't because
the status of the row is unchanged.
Basically any changes made to the text box controls are reflected in the
dataset, but the rowstatus does not switch to "modified"
Any help or ideas ASAP would be appreciated. I am totally at my wits end.
Thanks in advance.
...Nisha
My form has the following:
A couple of text boxes and a listbox.
I have a strongly typed dataset on my form and dataadapter which has only an
Select / Update commands. Both the select and update commands have the
command.text property set to a stored proc. The select works nicely and
retrieves multiple rows in the listbox. As all the controls are bound to
columns within the same dataset, clicking on the listbox item scrolls to the
right row and the text boxes display the correct values. In short there is
no binding manager used... but the listbox does it automatically.
Below is the following code that is executed when I click on the save
button.
dim irow as integer = lisbox1.selectedindex
dim rowstatus = ds_regulatory.tables(0).rows(irow).rowstate()
At this point the value of rowstatus is "unchanged" although I am expecting
it to be "modified"
If ds_regulatory.haschanges() then
adapter_reg.Update(ds_regulatory)
endif
At this point when I check the sqlProfiler ( SQL tracking tool for MS
SQLServer), to see if the stored proc has gotten fired.... it hasn't because
the status of the row is unchanged.
Basically any changes made to the text box controls are reflected in the
dataset, but the rowstatus does not switch to "modified"
Any help or ideas ASAP would be appreciated. I am totally at my wits end.
Thanks in advance.
...Nisha