G
Guest
I'm getting there!
I'm using vs.net and have created a dataadapter and a recordset in a
component.
i'm able to reference the component to get data .Hey! i even created a
dataview!
however, i'm not sure how to reference the created oledbupdate command.
when i attempt to set the parameters i'm getting an error saing that
"Parameter ?_1 has no default value." (given that a key is there)
here is my update sub:
Private Sub DataGrid1_UpdateCommand(ByVal source As Object, ByVal e As
System.Web.UI.WebControls.DataGridCommandEventArgs) Handles
DataGrid1.UpdateCommand
'Response.Write(myComponent.OleDbUpdateCommand1.CommandText)
myComponent.OleDbConnection1.Open()
myComponent.OleDbUpdateCommand1.Parameters.Add("itmQty", 6.3)
myComponent.OleDbUpdateCommand1.Parameters.Add("itmSubIDX", 2)
myComponent.OleDbUpdateCommand1.ExecuteNonQuery()
myComponent.OleDbConnection1.Close()
End Sub
here is the generated parameters in the component:
Me.OleDbUpdateCommand1.Connection = Me.OleDbConnection1
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("itmQty",
System.Data.OleDb.OleDbType.Integer, 0, "itmQty"))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("itmSubIDX",
System.Data.OleDb.OleDbType.SmallInt, 0, "itmSubIDX"))
thanks!!!
kes
I'm using vs.net and have created a dataadapter and a recordset in a
component.
i'm able to reference the component to get data .Hey! i even created a
dataview!
however, i'm not sure how to reference the created oledbupdate command.
when i attempt to set the parameters i'm getting an error saing that
"Parameter ?_1 has no default value." (given that a key is there)
here is my update sub:
Private Sub DataGrid1_UpdateCommand(ByVal source As Object, ByVal e As
System.Web.UI.WebControls.DataGridCommandEventArgs) Handles
DataGrid1.UpdateCommand
'Response.Write(myComponent.OleDbUpdateCommand1.CommandText)
myComponent.OleDbConnection1.Open()
myComponent.OleDbUpdateCommand1.Parameters.Add("itmQty", 6.3)
myComponent.OleDbUpdateCommand1.Parameters.Add("itmSubIDX", 2)
myComponent.OleDbUpdateCommand1.ExecuteNonQuery()
myComponent.OleDbConnection1.Close()
End Sub
here is the generated parameters in the component:
Me.OleDbUpdateCommand1.Connection = Me.OleDbConnection1
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("itmQty",
System.Data.OleDb.OleDbType.Integer, 0, "itmQty"))
Me.OleDbUpdateCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("itmSubIDX",
System.Data.OleDb.OleDbType.SmallInt, 0, "itmSubIDX"))
thanks!!!
kes