[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Eric

7/6/2002 12:22:00 PM

Dear All,
Please help me with below ASP.Net progra.

...
public dim ds as dataset
public dim cn as SQLConnection
public dim cmd as SQLDataAdapter
public dt as datatable
sub page_load(sender as object, e as EventArgs)

cn=new SQLConnection("server='192.168.1.18';uid=sa;pwd=;database=dkord")
cmd=new SQLDataAdapter("select * from tmaterial order by inumber",cn)
ds=new dataset()
cmd.fill(ds,"tmaterial")
dt=ds.tables("tmaterial")

end sub
...
dt.rows(dla.edititemindex)("cName")=txttemp.text
cmd.update(ds,"tmaterial")
...

When I try to update the table,has this error message.

Update requires a valid UpdateCommand when passed DataRow collection with
modified rows.

any help would be appreciate, thanks in advance.