Guarda.. anche in questo caso mi da quell'errore!!
codice:
<script runat="server">
Sub Page_Load(obj as object, e as EventArgs)
Dim conn as New oleDbConnection("Provider=Microsoft.Jet.OleDb.4.0;" & _
"Data Source=c:\Dev\Data\banking.mdb")
Dim ds as new DataSet("MyDataSet")
Dim objCmd as new OleDbDataAdapter("SELECT * FROM tblUsers WHERE UserID < 10", Conn)
objCmd.Fill(ds, "tblUsers")
ds.Tables("tblUsers").Rows(2)(3) = "ASPVille"
Dim dr as DataRow = ds.Tables("tblUsers").NewRow()
dr(0) = "Greg"
dr(1) = "Smith"
dr(2) = "434 Maple Apt B"
dr(3) = "Minneapolis"
dr(4) = "MN"
dr(5) = "12588"
dr(6) = "5189876259"
ds.Tables("tblUsers").Rows.Add(dr)
objCmd.UpdateCommand = new OleDbCommand
objCmd.UpdateCommand.CommandText = "Update tblUsers " & _
"SET City='ASPVille' WHERE UserID=3"
objCmd.UpdateCommand.Connection = Conn
objCmd.InsertCommand = new OleDbCommand
objCmd.InsertCommand.CommandText="Insert INTO " & _
"tblUsers (FirstName, Lastname, Indirizzo, City, " & _
"Stato, ZIP, Phone) VALUES ( 'Greg', 'Smith', " & _
"'434 Maple Apt B', 'Minneapolis', 'MN', '12588', " & _
"'5189876259')"
response.write(objCmd.InsertCommand.CommandText)
objCmd.InsertCommand.Connection = Conn
objCmd.Update(ds, "tblUsers")
End Sub
</script>
Originariamente inviato da sms
response.write(objCmd.InsertCommand.CommandText)