刚刚做.net,问一个很简单的问题:VB连Oracle 为什么说 Connect Timeout=180 是无效的,Connect Timeout是怎么用的 Private m_con As Data.OracleClient.OracleConnection Private m_ORATrans As Data.OracleClient.OracleTransaction Public Function dOpen(ByVal sDBSid As String,_ ByVal sDBUserID As String,_ ByVal sDBPass As String) As Boolean Dim bRet As Boolean dOpen = False Try Dim conStr As String conStr = "data source= " & sDBSid & "; " conStr &= "user id= " & sDBUserID & "; " conStr &= "password= " & sDBPass & "; " conStr &= "Connect Timeout=180 " m_con = New Data.OracleClient.OracleConnection(conStr) m_con.Open() Catch ex As System.Exception Msg
Box(ex.Message) ''Throw ex Exit Function End Try dOpen = True End Function __________________________________________________________________________ 好象是连接超时吧。不用那个也可以 __________________________________________________________________________
原文链接:https://www.f2er.com/vb/264101.html