R
Raphaël Désalbres
Hello,
I've the following problem:
A simple table (Users) with 2 fields, UserID (Primary key) and UserName
The code:
dim cnn as new oledbconnection
cnn.connectionstring="Provider=Microsoft.JET.OLEDB.4.0;Data Source=" &
server.mappath("bd1.mdb")
cnn.open
dim da as new oledbdataadapter("SELECT * FROM Users",cnn)
dim ds as new dataset()
dim dr as datarow
da.fill(ds,"Users")
dr =ds.Tables("Users").Rows(3)
dr("UserName") = "Raphaël Désalbres"
da.update(ds,"Users")
cnn.close
Produces the following error:
Update requires a valid UpdateCommand when passed DataRow collection with
modified rows.
How can I update the table using Dataset...
Thanks,
Raphaël...
I've the following problem:
A simple table (Users) with 2 fields, UserID (Primary key) and UserName
The code:
dim cnn as new oledbconnection
cnn.connectionstring="Provider=Microsoft.JET.OLEDB.4.0;Data Source=" &
server.mappath("bd1.mdb")
cnn.open
dim da as new oledbdataadapter("SELECT * FROM Users",cnn)
dim ds as new dataset()
dim dr as datarow
da.fill(ds,"Users")
dr =ds.Tables("Users").Rows(3)
dr("UserName") = "Raphaël Désalbres"
da.update(ds,"Users")
cnn.close
Produces the following error:
Update requires a valid UpdateCommand when passed DataRow collection with
modified rows.
How can I update the table using Dataset...
Thanks,
Raphaël...