Solved

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

Posted on 2008-06-17
5
1,871 Views
Last Modified: 2010-04-21
Hi Experts,
I am getting the following error when I try to open my asp page.

Error Type:
ADODB.Command (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
/FoundationNetwork/Tfn_NetAffliateUD.asp, line 14

Line 14 is
cmdUpdate.CommandType = adCmdStoredProc

Thanks
<%@ Language=VBScript%>

<% Option Explicit %>

<html>

<head></head>

<body>

<form name= "AffiliateUD" action="Tfn_NetAffiliateUD.asp" method="post" >

</form>

<%

Dim strConnect, adCmdStoredProc, cmdUpdate, adExecuteNoRecords

strConnect = "Driver={SQL

SERVER};Server=XXX.XX.XX.XXX;Database=test;Uid="";Pwd=pw"

Set cmdUpdate = Server.Createobject("ADODB.Command")

cmdUpdate.ActiveConnection = strConnect

cmdUpdate.CommandText = "usp_Tfn_Affiliates"

cmdUpdate.CommandType = adCmdStoredProc
 

cmdUpdate.Execute,,adExecuteNoRecords

%>

</body>

</html>

Open in new window

0
Comment
Question by:millerfw
  • 2
  • 2
5 Comments
 
LVL 29

Accepted Solution

by:
rdivilbiss earned 250 total points
Comment Utility
Put the following as the very fisrt line of your file.  Before the opening script tag


<!--METADATA TYPE="typelib" uuid="00000205-0000-0010-8000-00AA006D2EA4" -->
0
 

Author Comment

by:millerfw
Comment Utility
Tried this and I get the same error.
0
 
LVL 25

Expert Comment

by:kevp75
Comment Utility
best bet is to include the adovbs.inc file in yur script.

I don't know the numeric value off the top of my head, but the issue you are having is because of this.  If I can find it tomorrow morning(ish) I'll post a link to the numeric values of the 'adCmdStoredProc" & "adExecuteNoRecords" for ya
0
 
LVL 29

Assisted Solution

by:rdivilbiss
rdivilbiss earned 250 total points
Comment Utility
@kev75,

<!--METADATA TYPE="typelib" uuid="00000205-0000-0010-8000-00AA006D2EA4" --> is the adovbs.inc, :)

But the problem would be redefining those constants on this line:

Dim strConnect, adCmdStoredProc, cmdUpdate, adExecuteNoRecords
-----------------------^ no --------------------------------------^ no
0
 

Author Closing Comment

by:millerfw
Comment Utility
I am spliting the points and reivilbiss's addition made the solution work
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now