Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Error calling store procedure in VBscript

Error calling store procedure in VBscript

Error calling store procedure in VBscript

It just has two parameters ID, Pos
Microsoft VBScript runtime error '800a01be'

Object doesn't support named arguments: 'CommandText'

/sp/saveit.asp, line 24


    Set cmd = server.CreateObject("ADODB.Connection")
    cmd.Open "driver=SQL Server;server=;uid=user;pwd=Password;database=mydb;"

    cmd.CommandText = "InsertTransaction"
    cmd.CommandType = adCmdStoredProc

    cmd.Parameters(1) =ID
    cmd.Parameters(2) = Pos


RE: Error calling store procedure in VBscript

CommandText is part of ADODB.Command: not ADODB.Connection

RE: Error calling store procedure in VBscript

OK Thanks for that info.
I have to open a connection this is to a hosted site so I have to connect that way.
But what do I need to add to get to the "command" part?
Can you assist in modify this to make it work? I know some of this code but not much.


RE: Error calling store procedure in VBscript

OK I got this now, but getting error
ADODB.Command error '800a0bb9'

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

/sp/saveit.asp, line 27


    Set Conn = server.CreateObject("ADODB.Connection")
    Set cmd = server.CreateObject("ADODB.Command")

    Conn.ConnectionString ="driver=SQL Server;server=;uid=robot_admin;pwd=Pass-123;database=robots2000;"
    cmd.CommandText = "InsertTransaction"
    cmd.CommandType = adCmdStoredProc        ' <<<<< Line 27
    cmd.ActiveConnection = Conn.ConnectionString
    'Set objparameter=objcommand.CreateParameter (name,type,direction,size,value)' see

    Set ParmeterID = cmd.CreateParameter("Student_ID", adInteger, adParamInput,StudentID)
    Set ParmeterPos =cmd.CreateParameter("Position" , adInteger, adParamInput,Position )
    cmd.ParametersAppend(1) = ParmeterID
    cmd.ParametersAppend(2) = ParmeterPos

    Conn = nothing
    cmd = nothing
    ParmeterID  = nothing
    ParmeterPos  = nothing


RE: Error calling store procedure in VBscript

Possibly adCmdStoredProc is not defined.  See if 4 works.


If you get errors on CreateParameter, try 3 for adInteger http://www.w3schools.com/ado/prop_para_type.asp and 1 for adParamInput http://www.w3schools.com/ado/prop_para_direction.asp .

The last bit before the execute should be


    cmd.Parameters.Append ParmeterID
    cmd.Parameters.Append ParmeterPos

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close