This is a discussion on ODBC Connection within the MS SQL ODBC forums, part of the Microsoft SQL Server category; --> Hi, All, I got problem with ODBC connection, I have a product server and a stage server, I made ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi, All, I got problem with ODBC connection, I have a product server and a stage server, I made a sysdsn called SQLDSN, create a com+ called login and just a very simply statement: list below: private oconn as new adodb.connection Public Function vPWD() As Boolean Dim lngID As Long Dim intTemp As Integer Dim intPWD As Integer Dim strSQL As String Dim oRS As New ADODB.Recordset Call startConn oConn.spLogin strName & "," & strPWD, oRS If oRS.BOF And oRS.EOF Then vPWD = False Else vPWD = True strOpCode = oRS.Fields("Opcode") If IsNull(oRS.Fields("aop")) Then bisOrg = False Else bisOrg = True End If End If oRS.Close Set oRS = Nothing End Function Private Sub startConn() On Error GoTo err_handler If Not bConnActive Then oConn.Open strDSN bConnActive = True End If Exit_function: Exit Sub err_handler: Resume Exit_function End Sub and create a instance of login from asp page, ODBC is tested working fine both stage and product firewall is turned off on stage server. connection timeout set to unlimited. security context is fine. from com debug, odbc connection is fine, both with stage and product the problem is, when I change the odbc link server from product to stage run the login.asp it does not work, and I got error message ADODB.Connection (0x800A0E78) Operation is not allowed when the object is closed. anyone can help will be appreciated. Thanks Yifei |
| ||||
| I found solution: set com+ application security check at process level Thanks Yifei "Yifei" <yjiang@sdg.aust.com> wrote in message news:eNmKDvJxFHA.3236@TK2MSFTNGP14.phx.gbl... > Hi, All, > > I got problem with ODBC connection, I have a product server and a stage > server, I made a sysdsn called SQLDSN, create a com+ called login and just a > very simply statement: list below: > private oconn as new adodb.connection > Public Function vPWD() As Boolean > Dim lngID As Long > Dim intTemp As Integer > Dim intPWD As Integer > Dim strSQL As String > Dim oRS As New ADODB.Recordset > > Call startConn > > oConn.spLogin strName & "," & strPWD, oRS > > If oRS.BOF And oRS.EOF Then > vPWD = False > Else > vPWD = True > strOpCode = oRS.Fields("Opcode") > If IsNull(oRS.Fields("aop")) Then > bisOrg = False > Else > bisOrg = True > End If > End If > oRS.Close > Set oRS = Nothing > End Function > > Private Sub startConn() > On Error GoTo err_handler > If Not bConnActive Then > oConn.Open strDSN > bConnActive = True > > End If > Exit_function: > Exit Sub > err_handler: > Resume Exit_function > End Sub > > > and create a instance of login from asp page, > > ODBC is tested working fine both stage and product > firewall is turned off on stage server. > connection timeout set to unlimited. > security context is fine. > > from com debug, odbc connection is fine, both with stage and product > > the problem is, when I change the odbc link server from product to stage run > the login.asp it does not work, and I got error message > > ADODB.Connection (0x800A0E78) > Operation is not allowed when the object is closed. > > anyone can help will be appreciated. > > Thanks > > Yifei > > |
| Thread Tools | |
| Display Modes | |
|
|