SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseSQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old April 2nd, 2004, 03:07 PM
plasma800 plasma800 is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: Houston
Posts: 407 plasma800 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 12 h 13 m 36 sec
Reputation Power: 5
Send a message via Yahoo to plasma800
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?

Reply With Quote
  #2  
Old April 2nd, 2004, 04:22 PM
Memnoch's Avatar
Memnoch Memnoch is offline
Unholy Moderator
ASP Free God 14th Plane (11500 - 11999 posts)
 
Join Date: Oct 2003
Location: In hell, where did you think?
Posts: 11,776 Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 3 Weeks 5 Days 8 h 27 m 42 sec
Reputation Power: 470
Is there a specific reason you are using a recordset object?

Reply With Quote
  #3  
Old April 2nd, 2004, 04:41 PM
plasma800 plasma800 is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: Houston
Posts: 407 plasma800 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 12 h 13 m 36 sec
Reputation Power: 5
Send a message via Yahoo to plasma800
Wellll.. thats a good question! I have no idea! lol cause my book said so

What other choices do i have?

Reply With Quote
  #4  
Old April 2nd, 2004, 05:02 PM
plasma800 plasma800 is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: Houston
Posts: 407 plasma800 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 12 h 13 m 36 sec
Reputation Power: 5
Send a message via Yahoo to plasma800
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.

Reply With Quote
  #5  
Old April 2nd, 2004, 05:11 PM
plasma800 plasma800 is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: Houston
Posts: 407 plasma800 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 12 h 13 m 36 sec
Reputation Power: 5
Send a message via Yahoo to plasma800
hold the phone i have a break through.. I think.. more is a sec!

Reply With Quote
  #6  
Old April 2nd, 2004, 05:16 PM
plasma800 plasma800 is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: Houston
Posts: 407 plasma800 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 12 h 13 m 36 sec
Reputation Power: 5
Send a message via Yahoo to plasma800
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 &_

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseSQL Development > ok.. I keep getting the same error over a different SQL select statements...Whats up!


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT