Option Explicit Public DB As ADODB.Connection Public Function getConn() Set DB = New ADODB.Connection DB.Open "Driver={Microsoft Visual FoxPro Driver};SourceType=DBC;SourceDB=d:\vb6projects\youthbase\data\youthbase.dbc; Exclusive = No;" End Functionand to get a recordset...
Dim rs as ADODB.Recordset Set rs = New ADODB.Recordset rs.Open "select * from users where us_userid = '" & strUser & "'", DB, adOpenStatic, adLockOptimistic, adCmdTextThis is all fine... but I am programming for shared access...
errHandler: If Err.Number = -2147467259 Then Err.Clear rs.CancelUpdate rs.Close Set rs = Nothing Set rs = New ADODB.Recordset rs.Open "select * from users where us_userid = '" & strUser & "'", DB, adOpenStatic, adLockOptimistic, adCmdText Resume retryUpdate End Ifthis returns the program back to where the error occurred...
retryUpdate: rs!us_loggedin = True rs!us_atpc = oAppPCName If rs!us_firsttime = True Then oAppFirstTime = True rs!us_firsttime = False Else oAppFirstTime = False End If On Error GoTo errHandler rs.UpdateBUT the same error occurs and we are back into the error handling routine...