Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • 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!

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

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...Congratulations on a brilliant idea and a great site..."

Geography

Where in the world do Tek-Tips members come from?
DougP (MIS)
3 May 12 18:45
It just has two parameters ID, Pos
Error:
Microsoft VBScript runtime error '800a01be'

Object doesn't support named arguments: 'CommandText'

/sp/saveit.asp, line 24
----------

CODE

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

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

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

DougP
 

xwb (Programmer)
5 May 12 1:36
CommandText is part of ADODB.Command: not ADODB.Connection
DougP (MIS)
5 May 12 2:20
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.
TIA

DougP
 

DougP (MIS)
5 May 12 3:18
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
---------------

CODE

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

    Conn.ConnectionString ="driver=SQL Server;server=205.178.152.126;uid=robot_admin;pwd=Pass-123;database=robots2000;"
    
    cmd.CommandText = "InsertTransaction"
    cmd.CommandType = adCmdStoredProc        ' <<<<< Line 27
    cmd.Parameters.Refresh
    
    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
    
    cmd.Execute

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

DougP
 

xwb (Programmer)
9 May 12 16:26
Possibly adCmdStoredProc is not defined.  See if 4 works.

http://www.w3schools.com/ado/prop_comm_commandtype.asp

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

CODE

    cmd.Parameters.Append ParmeterID
    cmd.Parameters.Append ParmeterPos
ChrisHirst (IS/IT--Management)
10 May 12 9:18
http://www.candsdesign.co.uk/articles/code/asp/vbscript-constants/

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum

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