Unix Technical Forum

ODBC Connection

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 ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > MS SQL ODBC

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-27-2008, 08:55 PM
Yifei
 
Posts: n/a
Default 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


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-27-2008, 08:55 PM
Yifei
 
Posts: n/a
Default Re: ODBC Connection

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
>
>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 07:56 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com