|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
ok.. I keep getting the same error over a different SQL select statements...Whats up!
Ok, the error I get is ---
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 This has happened now on two different statements.. and I can't figure it out! This particular statement, i ran in QA and it goes perfect..lemme show ya statement and point out line 68 Code:
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 'line 68
DIM company
company = vendorRs("company")
vendorRs.close
set vendorRs = nothing
why is this happening.. I can figure out not a thing! Normally i open rs like... vendorRs.open "Select * from wherever", objCn, 1, 3 but since this is a long one, the method above is the only one I know to get it on a bunch of lines.. The ONLY thing I can think of.. is that prodID is passed to the page from a querystring.. could the it be an STR in the page, but the statement need it to be an INT... ? I dunno, Im lost.. please help, did i do something silly? |
|
#2
|
||||
|
||||
|
Is there a specific reason you are using a recordset object?
|
|
#3
|
|||
|
|||
|
Wellll.. thats a good question! I have no idea! lol cause my book said so
What other choices do i have? |
|
#4
|
|||
|
|||
|
R u thinking maybe a command object might be the way to go...
Im not overly familiar with it, but i know it's in the ado model.. just don;t understand why yet.. \This book says... use a command object in conjunction with a SQL database query or a stored procedure to retrieve data for a recordset... add and delete... or to retrieve a set of records without returning a recordset object. ![]() Last edited by plasma800 : April 2nd, 2004 at 05:05 PM. |
|
#5
|
|||
|
|||
|
hold the phone i have a break through.. I think.. more is a sec!
|
|
#6
|
|||
|
|||
|
You're not gonna beleive this...
I changed to the code to THIS.. Code:
'Time for a list of vendors!
Dim vendorRS, SQL
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& "'"
set vendorRS = Server.CreateObject("ADODB.Recordset")
vendorRS.Open SQL ,objCn, 1, 3
DIM company
Do while not vendorRs.eof
response.Write("company :" &vendorRs("company") &"<br>")
vendorRs.movenext
loop
vendorRs.close
set vendorRs = nothing
and it works... I put a space at the end of each line before the " and commented out the &_ |
![]() |
| Viewing: ASP Free Forums > Database > SQL Development > ok.. I keep getting the same error over a different SQL select statements...Whats up! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|