Friday, March 9, 2012

HELPPP SQL select statement pissing me off, error, but why.....

grr.
I have two different select statements that are giving me the same error.. and its getting irritating cause i cant figure out why...

the error IS --tada--

-------------
ADODB.Recordset error '800a0bb9'

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

/vendorlist.asp, line 68
-------------
Here's the statement.. and ill point out line 68 below with a few other details...
-------------
Dim vendorRS, SQL
set vendorRS = Server.CreateObject("ADODB.Recordset")
SQL = "SELECT ttVendors.company, ttVendors.website, ttVendors.phone, ttVendors.phone800,ttVendors.vendorID," &_
SQL = SQL & "ttInventory.newprice, ttInventory.refurbprice, ttInventory.oosprice, ttInventory.venddescrip" &_
SQL = SQL & "FROM ttVendors INNER JOIN ttInventory on ttVendors.vendorID = ttInventory.vendorID" &_
SQL = SQL & "WHERE ttInventory.prodID = '" &prodID& "'"

vendorRS.Open SQL ,objCn, 1, 3

DIM company
company = vendorRs("company")
vendorRs.close
set vendorRs = nothing
--------------
Ok so... line 68 IS
vendorRS.Open SQL ,objCn, 1, 3

ive tried it like
vendorRS.Open = SQL ,objCn, 1, 3
vendorRS.Open, SQL ,objCn, 1, 3
vendorRS.Open SQL ,objCn, 3, 3

no luck..
Also, prodID is passed from a querystring from previous page.. just used the typical request object to gather.. in the DB, all prodID fields are of INT type.. and im wondering if that makes a difference..

any ideas.. or blanks i can fill it?PS,, in Query analyzer, the statement works perfect...!!

No comments:

Post a Comment