Public Function sCreateConnection(ByVal udlFileName As String) As Boolean
On Error GoTo sCreateConnectionTrap:
Dim sConnectionString As String
sConnectionString = "rovider=" & udlFileName
Application.CurrentProject.OpenConnection sConnectionString
Application.CurrentProject.Connection.ConnectionTimeout = 300'设置超时.
sCreateConnection = True
sCreateConnectionExit:
Exit Function
sCreateConnectionTrap:
sCreateConnection = False
MsgBox Err.Description, vbInformation, sysstr
Resume sCreateConnectionExit
End Function
=======================
为什么这句通不过Application.CurrentProject.Connection.ConnectionTimeout = 300'设置超时.