ODBC Connection



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


.



Relevant Pages

  • Re: ODBC Connection
    ... Yifei ... > 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 ... > Dim intTemp As Integer ...
    (microsoft.public.sqlserver.odbc)
  • Application run correctly in a server with Visual Studio but not run in web server
    ... server with .NET framework and without Visual Studio. ... Here is the code of Login() in VB.NET: ... Dim lEstado As Boolean ...
    (microsoft.public.dotnet.languages.csharp)
  • Forms Authentication for multiple applications
    ... I have several applications all on the same server. ... I have a login page located in the root of the same server: ... Dim tkt As FormsAuthenticationTicket ... Dim cookiestr As String ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Crystal report problem
    ... No error, it just comes up with a dialog box to login to the server, the ... database and then the login in with password. ... >> Dim rpt As New CrystalDecisions.CrystalReports.Engine.ReportDocument ...
    (microsoft.public.dotnet.languages.vb)
  • Re: How to run word and pass a mail merge values and fax it to the recipient
    ... applications in an unattended server environment - there's a KB article on ... I'd aim to use a Word macro anyway to generate the faxes rather ... Dim bFaxServerAvailable As Boolean ... Dim oFaxPorts As FAXCOMLib.FaxPorts ...
    (microsoft.public.word.vba.general)