We help IT Professionals succeed at work.
Get Started

ADODB and wrong data type

ols2
ols2 asked
on
342 Views
Last Modified: 2008-07-14
I have gotten superb help on a question from others here in Experts exchange, however the answer lead to another snag i am desperate to fix.

The below kode leads to the following error:
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 12

I use MSSql 2000,  The record is int, unique and primary key
Does anyone have a solution for this?
<%Option Explicit%>
<!--#include file="adovbs.inc"-->
<%
Dim myid, conn, cmd, adInput
MyId = Request.Querystring("id")
Set Conn = (Server.CreateObject("ADODB.Connection"))
Conn.Open Application("NF")
set cmd = Server.CreateObject("ADODB.Command")
cmd.ActiveConnection = Conn.ConnectionString
cmd.CommandText = "SELECT * FROM funny_pictures where id = @ID"
 
cmd.Parameters.Append cmd.CreateParameter("@ID", adInteger, adInput, ,MyID)
set rs = cmd.Execute
%>

Open in new window

Comment
Watch Question
This problem has been solved!
Unlock 2 Answers and 23 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE