Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ADO Problem
Message
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Title:
ADO Problem
Miscellaneous
Thread ID:
00593405
Message ID:
00593405
Views:
56
In the following function, I'm getting the error:
"Rowset does not support fetching backward"

on the line with oRecSet.MoveLast

I'm using Microsoft Jet OLEDB 3.51 as a provider, and the
recordset cursortype is adOpenKeyset.


Public function GetNextRecordId As Integer

Dim iRetVal As Integer

Set oSqlCmd = New ADODB.Command
oSqlCmd.ActiveConnection = oConn
oSqlCmd.CommandType = adCmdText
oSqlCmd.CommandText = "select recordid from members"

Set oRecSet = New ADODB.Recordset
Set oRecSet = oSqlCmd.Execute

oRecSet.MoveLast
iRetVal = oRecSet.Fields("RecordId").Value + 1

GetNextRecordId = iRetVal
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Next
Reply
Map
View

Click here to load this message in the networking platform