Consuming a ADODB connection object return from a COM component in

Discussion in 'ASP General' started by Venkatesan S, Apr 18, 2008.

  1. Venkatesan S

    Venkatesan S Guest

    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

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

    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

    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

    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.
    Venkatesan S, Apr 18, 2008
    1. Advertisements

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

    Venkatesan S wrote:
    > 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.

    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
    Bob Barrows [MVP], Apr 19, 2008
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. PJ
    George Ter-Saakov
    Oct 30, 2003
  2. Steven Baeten

    ADODB.connection safety settings error

    Steven Baeten, May 7, 2004, in forum: ASP .Net
    Mary Chipman
    May 9, 2004
  3. Andy G

    ADODB.Connection closing issues

    Andy G, Nov 14, 2005, in forum: ASP .Net
    Andy G
    Nov 14, 2005
  4. Joe Befumo

    Type 'ADODB.Connection' is not defined.

    Joe Befumo, Feb 19, 2006, in forum: ASP .Net
    Joe Befumo
    Feb 19, 2006
  5. Replies:
    Jun 3, 2005

Share This Page