I'm getting the error 'Recordset does not support updating'. Here's
my code.
My connection code is:
sConnectString = "Provider=Microsoft.Jet.OLEDB.4.0;Data _ Source=D:\Projects\Marketing\Data\3k.mdb;Persist Security Info = False"
Set oConn = New ADODB.Connection
oConn.Open sConnectString
The error occurs when I run this (On the AddNew line):
Set oDetails = OpenTable(oConn, "order_details")
With oOrdDetRecs
.AddNew
!OrderId = iOrderId
!ProductId = cboParts(iRow).GetItemId()
!Quantity = txtQuantity(iRow).Text
!Price = Val(lblPrice(iRow).Caption)
!Subtotal = iQuantity * yPrice
.Update
End With
The OpenTable function is here:
Public Function OpenTable(oConn As ADODB.Connection, sTableName As String) As ADODB.Recordset
' Create a record set
Set oRecSet = New ADODB.Recordset
With oRecSet
' Assign the record set properties
.ActiveConnection = oConn
.CursorType = adOpenKeyset
.LockType = adLockOptimistic
.CursorLocation = adUseServer
' Open the record set
.Open sTableName
End With
' Return the record set object
Set OpenTable = oRecSet
End Function
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people