Forums
This topic is locked
query problems
Posted 15 Jun 2003 13:55:04
1
has voted
15 Jun 2003 13:55:04 derek webster posted:
I'm trying to add a request variable "VARbrand" to my SQL query like soSELECT *
FROM [tblBrands Query]
WHERE tblBrands_BrandId = "VARbrand"
ORDER BY BrandName
but I keep getting a "too few parameters" error when testing the query.
Can anyone help.
Am I actually going about this the right way. I have a column of brands on the left hand side & I'm trying to have them dynamically bring back only records with that brand name. So I'm setting up a request variable in the query that only brings back the selected brands in my recordset...
is that the correct way of doing this.
Thanks
Edited by - webstar on 15 Jun 2003 14:49:58
Replies
Replied 16 Jun 2003 14:15:36
16 Jun 2003 14:15:36 Vince Baker replied:
If the brand id is numberic dont put quotes around your variable, and if it is text, use single quotes.
Regards
Vince
Visit my home: www.chez-vince.com
VBScript | ASP | HTML | SQL | Oracle | Hosting
Regards
Vince
Visit my home: www.chez-vince.com
VBScript | ASP | HTML | SQL | Oracle | Hosting
Replied 16 Jun 2003 16:09:49
16 Jun 2003 16:09:49 derek webster replied:
Excellent, thanks but now another prob has appeared...
The Query now tests ok but when I create a repeating table from this new dynamic record set the page does not display at all. does this mean that there is no value being passed into the query.
Sorry but I'm very new to MX and asp, SQL
Thanks for your reply
The Query now tests ok but when I create a repeating table from this new dynamic record set the page does not display at all. does this mean that there is no value being passed into the query.
Sorry but I'm very new to MX and asp, SQL
Thanks for your reply
Replied 16 Jun 2003 16:32:24
16 Jun 2003 16:32:24 Brad Hitt replied:
Is it totally blank or your data just isn't being displayed?
Replied 16 Jun 2003 17:21:00
16 Jun 2003 17:21:00 derek webster replied:
The page doesn't load at all & I get an error message. I'm at work right now so I can't give you a note of what the error message is.
I'll post the error message in 2 hours when I get home.
Thanks again for the reply
I'll post the error message in 2 hours when I get home.
Thanks again for the reply
Replied 16 Jun 2003 18:37:51
16 Jun 2003 18:37:51 derek webster replied:
here's the error which I get on a "page cannot be displayed"
Error Type:
Microsoft VBScript compilation (0x800A03EA)
Syntax error
products.asp, line 7, column 12
If (Request('varBRAND') <> "" Then
-----------^
Error Type:
Microsoft VBScript compilation (0x800A03EA)
Syntax error
products.asp, line 7, column 12
If (Request('varBRAND') <> "" Then
-----------^
Replied 16 Jun 2003 19:04:01
16 Jun 2003 19:04:01 derek webster replied:
HA Ha no it's ok I've got it - I was still leaving an "" in the variable
Thanks for all your time taken to reply.
Many Thanks
Edited by - webstar on 16 Jun 2003 19:10:02
Edited by - webstar on 16 Jun 2003 21:58:31
Thanks for all your time taken to reply.
Many Thanks
Edited by - webstar on 16 Jun 2003 19:10:02
Edited by - webstar on 16 Jun 2003 21:58:31