[VB.NET]刚刚做.net,问一个很简单的问题:VB连Oracle

前端之家收集整理的这篇文章主要介绍了[VB.NET]刚刚做.net,问一个很简单的问题:VB连Oracle前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
刚刚做.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 MsgBox(ex.Message) ''Throw ex Exit Function End Try dOpen = True End Function __________________________________________________________________________ 好象是连接超时吧。不用那个也可以 __________________________________________________________________________

猜你在找的VB相关文章