实在不会了,各位教我怎么改,谢谢了!
请问,这里是哪里除问题了,该怎么改?谢谢!
Private Sub InitConnectObject()
Dim objUtility As epUtility
Dim strCNStr As String
Dim strPath As String
On Error GoTo ErrorHandler
strPath = App.Path
If Right(strPath, 1) = "\" Then
strPath = Left(strPath, Len(strPath) - 1)
Else
End If
strCNStr = "Provider=Microsoft.Jet.OLEDB.3.51;Password="""";Persist Security Info=True;Data Source=" & strPath & "\Epinfo2.mdb"
Set gadoCN = New ADODB.Connection
gadoCN.ConnectionString = strCNStr
gadoCN.Open
gConnString = strCNStr
CommonExit:
If Not (objUtility Is Nothing) Then Set objUtility = Nothing
On Error GoTo 0
Exit Sub
ErrorHandler:
If Not (objUtility Is Nothing) Then Set objUtility = Nothing
Err.Raise Err.Number
End Sub