Board index » Visual Studio » data adapter and sqlcommand
|
dfgallucci
|
data adapter and sqlcommand
Visual Studio182
I am confused about these two things 1st)As form load I new a data adapter programmicaly , and I can use stored procedure to 'select sth ' and then fill into the dataset.by using binding context, my form can display the correct data. 2nd) I want to new a record, so. dsinvocie.addnew(), I can type the new data. 3rd) I want to use the store procedure to insert this new record. my store procedure runs very well [I use SQL analyzer to test it] However, as i rund daInvoice.udpate(dsInvoice,"invoice") <-- it return error, it said I didn't delcare update command. I am confuse that [I only want to insert the data but not update], Do i need to declare another 'update command (store procedure ) ???] For some textbox, It said, I can use cmd.Exectuenonquery() to process my insert command. but not using adapter. I am really confused. Please help. Thanks a lot From Agnes - |
