SQL Server 2005 - [CreateParameter] - Generates Error (800a0bb9 - Arguments are of the wrong type)

N

news

(Posting to: public.sqlserver & public.asp.general)
Please someone help.
I have ran out of options, nothing I try, and I have tried a lot.
It is like everything that I through at my SQL Server 2005 Database gets
thrown back at me.

This is the [Error] that I am receiving.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
ADODB.Command error '800a0bb9'
Arguments are of the wrong type, are out of acceptable range, or are in
conflict with one another.
test.asp, line 22
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

This is the code(s) that I have tried.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Set sqlGal = Server.CreateObject("ADODB.Command")
sqlGal.ActiveConnection=objConn
sqlGal.Prepared = true
sqlGal.CommandText = "SELECT GalID, MemID, GalName, GalPath, GalDate FROM
Gal WHERE MemID=@MemID"
sqlGal.Parameters.Append sqlGal.CreateParameter("@MemID", ad_Int,
adParamInput, , sqlID) ' This line gets the error
Set rsGal = CreateObject("ADODB.Recordset")
set rsGal = sqlGal.execute
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

This is the other code that I have tried as well. (This was just a test
script)
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
<%
Set objCommand = Server.CreateObject("ADODB.Command")
objCommand.ActiveConnection=objConn
objCommand.Prepared = true
With objCommand
.CommandText = "usp_RecordsetAndOutputParams"
.Parameters.Append .CreateParameter("@GalName", advarchar, adParamOutput,
255) ' this line gets the same error.
.Parameters.Append .CreateParameter("@GalPath", advarchar, adParamOutput,
255)
End With
%>
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Thanks in advance for any help.
Wayne
 
N

news

Figured this one out.
Had to add in the CONST for the Parameters
In this case was.

const ad_Integer = 3
const adParamInput = 1

Have a good one all.
 
D

Daniel Crichton

news wrote on Fri, 10 Jul 2009 21:41:23 -0400:
Figured this one out.
Had to add in the CONST for the Parameters
In this case was.
const ad_Integer = 3 const adParamInput = 1
Have a good one all.


That still won't work with the code examples you gave, as you use ad_Int in
the first one, not ad_Integer. There is an adovbs.inc file that you can
include in your ASP that contains all the ADO constants, you'll find it in
C:\Program Files\Common Files\System\ado
 
B

Bob Barrows

news said:
(Posting to: public.sqlserver & public.asp.general)
Please someone help.
I have ran out of options, nothing I try, and I have tried a lot.
It is like everything that I through at my SQL Server 2005 Database
gets thrown back at me.

This is the [Error] that I am receiving.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
ADODB.Command error '800a0bb9'
Arguments are of the wrong type, are out of acceptable range, or are
in conflict with one another.
test.asp, line 22
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

http://www.aspfaq.com/show.asp?id=2112
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top