hi mpande, the code that Proffessor PC gives you it seems to work fine.. so maybe you can post the code that you try
Hi cguan the code that I'm using is this:
If productid = rs!product_id Then
Set updatedb = New ADODB.Connection
updatedb.Open "DSN=waterdb;Password=andile;User ID=eco;Data Source=waterdb"
Set rs1 = New ADODB.Recordset
rs1.Open "Select product_id,qty,stock_date,trans_type,qtydb from stock", "update stock set product_id=productid", "update stock set qty=qty", "update stock set stock_date=date", "update stock set trans_type=trans_type", "update stock set qtydb=qtydb"
With Adodc1
.Recordset.Update
.Recordset.Fields("product_id") = productid
.Recordset.Fields("qty") = qty
.Recordset.Fields("stock_date") = dop
.Recordset.Fields("trans_type") = "trans_type"
.Recordset.Fields("qtydb") = qtydb
End With
Else: MsgBox ("invalid product id")
End If
db.CommitTrans
rs.MoveNext
rs.Close
Set rs = Nothing
db.Close
Set db = Nothing
Loop
But the problem is at rsi.open, it gives me an error saying-wrong number of arguments or invalid property assignment.
Please help!!