Missing Something Obvious Here!

Discussion in 'ASP General' started by Wayne Wengert, Aug 30, 2003.

  1. I am trying to define the active connection for a command in an ASP page but
    I keep getting the error:

    ---------------------------------------------
    ADODB.Command error '800a0bb9'

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

    /LoginControl.asp, line 19

    --------------------------------

    Line 19 is the "cmdDC.ActiveConnection = myConn" line. The code is as
    follows:

    ====================================

    Dim cmdDC, RecordSet
    Dim strUserName, strPassword

    strUserName = Request.Form("txtName")
    strPassword = Request.Form("txtPassword")

    '-- Create command object
    Set cmdDC = Server.CreateObject("ADODB.Command")
    cmdDC.ActiveConnection = myConn

    ====================================

    I use an include file at the start of the ASP page to establish my
    connection - the included code is::

    ====================================

    Dim cst, myConn
    Sub CreateConnection()
    cst = "Provider=SQLOLEDB; Data Source = xx.xx.xx.xx; Initial Catalog =
    myDB; User ID = myID; Password=myPW"
    set myConn = Server.CreateObject("ADODB.Connection")
    myConn.open cst
    End Sub

    ====================================

    Any suggestions on what I did wrong here?
    --
    ------------------------------------
    Wayne Wengert
     
    Wayne Wengert, Aug 30, 2003
    #1
    1. Advertising

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. Steven D'Aprano
    Replies:
    2
    Views:
    361
    Dan Christensen
    Feb 20, 2006
  2. Ray Cote
    Replies:
    0
    Views:
    117
    Ray Cote
    Jan 3, 2013
  3. Barry Scott
    Replies:
    0
    Views:
    107
    Barry Scott
    Jan 3, 2013
  4. Ray Cote
    Replies:
    0
    Views:
    102
    Ray Cote
    Jan 4, 2013
  5. Chris Angelico
    Replies:
    2
    Views:
    154
    Chris Angelico
    Jan 4, 2013
Loading...

Share This Page