Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
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
Medium Priority
?
1,924 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 29

Accepted Solution

by:
rdivilbiss earned 750 total points
ID: 21809727
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
ID: 21809833
Tried this and I get the same error.
0
 
LVL 25

Expert Comment

by:kevp75
ID: 21810007
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 750 total points
ID: 21814039
@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
ID: 31468199
I am spliting the points and reivilbiss's addition made the solution work
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

610 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