The Set AdoCon=CreateObject (" ADODB. Connection ")
The Set errLoop=CreateObject (" ADODB library. The Error ")
'to Connect to the database
On Error GoTo DatabaseError
AdoCon. The ConnectionString=dsnSQLStr
AdoCon. Open
Mand Set AdoCmd=CreateObject (" ADODB.Com ")
AdoCmd. ActiveConnection=AdoCon
StrSQL="{Call" & amp; GET_PAGE_SP_NAME & amp; "(" & amp; Page_number & amp; ", "& amp; VISIBLE_ROWS & amp; ")}
"
Mand Set AdoCmd=CreateObject (" ADODB.Com ")
AdoCmd. ActiveConnection=AdoCon
AdoCmd.Com mandText strSQL=
AdoCmd.Com mandType=adoCmdStoredProc
Statement execution to AdoCmd. The ActiveConnection=AdoCon is submitted to the state SQL: 01000, Native Error: 5701
Error, what an encounter
CodePudding user response:
What is wrong details? Only an error code?CodePudding user response:
Option ExplicitDim AdoCon As Object
Dim AdoCmd As Object
Dim errLoop As Object
Dim dsnSQLStr As String
Private Sub Form_Load ()
The Set AdoCon=CreateObject (" ADODB. Connection ")
The Set errLoop=CreateObject (" ADODB library. The Error ")
'to Connect to the database
DsnSQLStr="DBQ=D: 1. 3 \ \ management project practice database MDB. DefaultDir=D: \ management project 3; Driver={Microsoft Access Driver (*. MDB)}; DriverId=25; FIL=MS Access; FILEDSN=C: \ Users \ \ Administrator \ Documents \ a. d. sn. MaxBufferSize=2048; MaxScanRows=8; PageTimeout=5; SafeTransactions=0; Threads=3; UID=admin; UserCommitSync=Yes."
AdoCon. The ConnectionString=dsnSQLStr
AdoCon. Open
Mand Set AdoCmd=CreateObject (" ADODB.Com ")
AdoCmd. ActiveConnection=AdoCon
End Sub
No problem!
Your error handler interference