Consuming a ADODB connection object return from a COM component in

V

Venkatesan S

Hi,
I have a requirement of consuming a connection object returned from a COM
component deployed in COM+ application. I have given the need for this
requirement end of my query.

My component returns a Connection objec to ASP page and then I am trying to
use the same Connection object to Command/Recordset object to execute a SP

I am getting the error given below
************************************
ADODB.Recordset error '800a0bb9'

Arguments are of the wrong type, are out of acceptable range, or are in
conflict with one another.

=====================================
Source code :
Option 1:
rs1.Open "MentorTest",objConnection.GetConnection,2,4,4

Option 2:

Dim sqlConnection
Set sqlConnection = objConnection.GetConnection
rs1.Open "MentorTest",sqlConnection,2,4,4

Option 3:
Dim sqlConnection
Set sqlConnection = Server.CreateObject("ADODB.Connection")
Set sqlConnection = objConnection.GetConnection
rs1.Open "MentorTest",sqlConnection,2,4,4

************************************
I ensured object creation by IsObject method, connection state of the
sqlConnection

Could you please tell what could be the issue. Your pointers will be
appreciated.


Need for the requirement
#################
We have an ASP application which is using an SQL login account to connect a
SQL DB. Currently there is a need of removing the SQL login and using a
domain account instead of SQL account.
To accomplish that we have tried various options.

Could you please suggest a approach to achieve the same.

Please find the approaches that we have tried and result of our analysis.


Option 1: Use Anonymous access

1. Creating domain account
2. Setting up Anonymous access for the web site.
3. Specifying the newly created domain account as credential for anonymous
access instead of IUSR_Machine account.

Why not viable: Validation of users is not possible and hence Authentication
of users will fail. Application is getting Login user details through Active
Server Pages Server variables (Request.Servervariables(“AUTH_Userâ€)). If
anonymous access is specified for the web site, system returns login user as
null.

Option 2: Using Application Pool (Option suggested by Charles)

Specifying integrated security for the SQL connection string and usage of
App pool with the service account in IIS server.
1. Creating a domain account.
2. Creating an App pool and specifying the domain account created above as
credential for App pool.
3. Setting up the App pool for Web site instead of Default app pool.
4. Changing the SQL connection string in global.asa file as Trusted
connection.

Why not viable: App pool is designed for ASP.Net application and does not
apply for ASP application. Though the application pool is set for the web
site, the credential of the login user is used for accessing the DB. This
would mean that users have to be given individual access to the DB. This is
not an acceptable method of access.

Option 3: Using Service account

1. Changing the connection string by removing the SQL Login and specifying
the new domain account with password in global.asa file

Why not viable: To use domain (windows NT) accounts for SQL connection,
basic authentication needs to be enabled. This will not be applicable because
all the application users needs to be added to SQL DB similar to Option 2.

Option 4: Using COM+

1. Creating a COM+ application which has component where a method returns a
connection object to the ASP page.
2. Connection object will use the identity set for the COM+ application.
3. ASP page will use the connection object provided by COM component.
 
B

Bob Barrows [MVP]

I've already replied to your original post. Please respond to that before we
waste any more time.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,968
Messages
2,570,152
Members
46,697
Latest member
AugustNabo

Latest Threads

Top