michelleHEC
Programmer
my update command is not working. can anyone see what the problem is? I am not getting an error...
Dim cnTag1 As New OleDb.OleDbConnection
cnTag1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Password=;User ID=Admin;data source=c:\BlownAway.db.mdb"
Dim sqlTag1 As String = "Update Supply set Quantity = ? where SupplyID = ? "
Dim cmTag1 As New OleDb.OleDbCommand(sqlTag1, cnTag1)
cmTag1.Parameters.Add(New OleDb.OleDbParameter("SupplyID", OleDb.OleDbType.VarChar, 50))
cmTag1.Parameters.Add(New OleDb.OleDbParameter("Quantity", OleDb.OleDbType.Integer, 4))
cmTag1.Parameters("SupplyID").Value = strSupplyID
cnTag1.Open()
cmTag1.Parameters("Quantity").Value = dblShirtT
cmTag1.ExecuteReader()
cnTag1.Close()
Thank you in advance.
Dim cnTag1 As New OleDb.OleDbConnection
cnTag1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Password=;User ID=Admin;data source=c:\BlownAway.db.mdb"
Dim sqlTag1 As String = "Update Supply set Quantity = ? where SupplyID = ? "
Dim cmTag1 As New OleDb.OleDbCommand(sqlTag1, cnTag1)
cmTag1.Parameters.Add(New OleDb.OleDbParameter("SupplyID", OleDb.OleDbType.VarChar, 50))
cmTag1.Parameters.Add(New OleDb.OleDbParameter("Quantity", OleDb.OleDbType.Integer, 4))
cmTag1.Parameters("SupplyID").Value = strSupplyID
cnTag1.Open()
cmTag1.Parameters("Quantity").Value = dblShirtT
cmTag1.ExecuteReader()
cnTag1.Close()
Thank you in advance.