R
Robert Johnson
Can some one tell me was would are the possiblies which
would cause this error message, "Object or provider is not
capable of performing requested operation." My provider is
Jet 4. The code stops at: !fldSmallObj = pstrTrans
This is code
Private Sub cmd2DObj_Click()
'On Error GoTo Err_cmd2DObj_Click
Dim connLA2DObj As New ADODB.Connection
Dim prstLA2DObj As New ADODB.Recordset
Dim pstrSQL As String, pstrAgyObj As String
Dim pstrTrans As String
pstrSQL = "SELECT fldAgyObj, fldSmallObj FROM tblTest"
'Makes connection to current project.
Set connLA2DObj = CurrentProject.Connection
prstLA2DObj.Open pstrSQL, connLA2DObj, adOpenKeyset
'Loops through the data base putting two digit objects in
the table.
With prstLA2DObj
Do Until .EOF
pstrAgyObj = !fldAgyObj
pstrTrans = Left(pstrAgyObj, 2)
!fldSmallObj = pstrTrans
.Update
.MoveNext
Loop
'Displays the record count.
txtRecCnt.Text = .RecordCount
'Closes the recordset.
.Close
End With
If Not prstLA2DObj Is Nothing Then Set prstLA2DObj =
Nothing
If Not connLA2DObj Is Nothing Then Set connLA2DObj =
Nothing
End Sub
would cause this error message, "Object or provider is not
capable of performing requested operation." My provider is
Jet 4. The code stops at: !fldSmallObj = pstrTrans
This is code
Private Sub cmd2DObj_Click()
'On Error GoTo Err_cmd2DObj_Click
Dim connLA2DObj As New ADODB.Connection
Dim prstLA2DObj As New ADODB.Recordset
Dim pstrSQL As String, pstrAgyObj As String
Dim pstrTrans As String
pstrSQL = "SELECT fldAgyObj, fldSmallObj FROM tblTest"
'Makes connection to current project.
Set connLA2DObj = CurrentProject.Connection
prstLA2DObj.Open pstrSQL, connLA2DObj, adOpenKeyset
'Loops through the data base putting two digit objects in
the table.
With prstLA2DObj
Do Until .EOF
pstrAgyObj = !fldAgyObj
pstrTrans = Left(pstrAgyObj, 2)
!fldSmallObj = pstrTrans
.Update
.MoveNext
Loop
'Displays the record count.
txtRecCnt.Text = .RecordCount
'Closes the recordset.
.Close
End With
If Not prstLA2DObj Is Nothing Then Set prstLA2DObj =
Nothing
If Not connLA2DObj Is Nothing Then Set connLA2DObj =
Nothing
End Sub