ODBC Connection
- From: "Yifei" <yjiang@xxxxxxxxxxxx>
- Date: Thu, 29 Sep 2005 12:16:09 +1000
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
.
- Follow-Ups:
- Re: ODBC Connection
- From: Yifei
- Re: ODBC Connection
- Prev by Date: Re: Linkedserver , Navision C/ODBC, Null columns Error
- Next by Date: Re: ODBC Connection
- Previous by thread: Maximum Databases in ODBC
- Next by thread: Re: ODBC Connection
- Index(es):
Relevant Pages
|