|
 |
asp_databases thread: Error in Script
Message #1 by arshad siddiqui <ash_arshad@y...> on Wed, 20 Feb 2002 05:35:37 -0800 (PST)
|
|
Hi,
I am using this code:
<%
Dim CatID,SubCatID
CatID = Request.QueryString ("CatID")
SubCatID = Request.QueryString ("SubCat")
sSQL = "SELECT
AccessoryID,CategoryID,SubCatID,AccessoryName,AccessoryDescription,AccessoryRegularPrice,AccessorySalePrice,AccessoryStockQuantity
FROM Products WHERE CategoryID="& CatID &" and
SubCatID="& SubCat &" "
%>
There is error coming in the script,its about sql but
I dont see any error in my sql statement.
The error is:
Microsoft OLE DB Provider for ODBC Drivers error
'80040e14'
[Microsoft][ODBC Microsoft Access Driver] Syntax error
(missing operator) in query expression 'CategoryID=1
and SubCatID='.
/ramy/accessory.asp, line 179
============================================
Any Idea about this
Help needed
Thanks
Regards
--Arshad--
__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com
Message #2 by "Meinken, Joe" <Joe.Meinken@q...> on Wed, 20 Feb 2002 07:39:58 -0600
|
|
You are setting SubCatID=Request.QueryString ("SubCat") but using the
"SubCat" variable in the select statement.
-----Original Message-----
From: arshad siddiqui [mailto:ash_arshad@y...]
Sent: Wednesday, February 20, 2002 7:36 AM
To: ASP Databases
Subject: [asp_databases] Error in Script
Hi,
I am using this code:
<%
Dim CatID,SubCatID
CatID = Request.QueryString ("CatID")
SubCatID = Request.QueryString ("SubCat")
sSQL = "SELECT AccessoryID,
CategoryID,
SubCatID,
AccessoryName,
AccessoryDescription,
AccessoryRegularPrice,
AccessorySalePrice,
AccessoryStockQuantity
FROM Products
WHERE CategoryID="& CatID &"
and SubCatID="& SubCat &" "
%>
There is error coming in the script,its about sql but
I dont see any error in my sql statement.
The error is:
Microsoft OLE DB Provider for ODBC Drivers error
'80040e14'
[Microsoft][ODBC Microsoft Access Driver] Syntax error
(missing operator) in query expression 'CategoryID=1
and SubCatID='.
/ramy/accessory.asp, line 179
============================================
Any Idea about this
Help needed
Thanks
Regards
--Arshad--
__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com
$subst('Email.Unsub').
Message #3 by Sam Clohesy <sam@e...> on Wed, 20 Feb 2002 13:41:26 -0000
|
|
Don't you need:
and
SubCat="& SubCatID &" " ??
-----Original Message-----
From: arshad siddiqui [mailto:ash_arshad@y...]
Sent: 20 February 2002 13:36
To: ASP Databases
Subject: [asp_databases] Error in Script
Hi,
I am using this code:
<%
Dim CatID,SubCatID
CatID = Request.QueryString ("CatID")
SubCatID = Request.QueryString ("SubCat")
sSQL = "SELECT
AccessoryID,CategoryID,SubCatID,AccessoryName,AccessoryDescription,Accessory
RegularPrice,AccessorySalePrice,AccessoryStockQuantity
FROM Products WHERE CategoryID="& CatID &" and
SubCatID="& SubCat &" "
%>
There is error coming in the script,its about sql but
I dont see any error in my sql statement.
The error is:
Microsoft OLE DB Provider for ODBC Drivers error
'80040e14'
[Microsoft][ODBC Microsoft Access Driver] Syntax error
(missing operator) in query expression 'CategoryID=1
and SubCatID='.
/ramy/accessory.asp, line 179
============================================
Any Idea about this
Help needed
Thanks
Regards
--Arshad--
__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com
$subst('Email.Unsub').
Message #4 by "Shripad_01" <shripad_01@y...> on Thu, 21 Feb 2002 10:38:56 +0530
|
|
try to give space before and after '&'
----- Original Message -----
From: "arshad siddiqui" <ash_arshad@y...>
To: "ASP Databases" <asp_databases@p...>
Sent: Wednesday, February 20, 2002 7:05 PM
Subject: [asp_databases] Error in Script
> Hi,
> I am using this code:
> <%
> Dim CatID,SubCatID
> CatID = Request.QueryString ("CatID")
> SubCatID = Request.QueryString ("SubCat")
> sSQL = "SELECT
>
AccessoryID,CategoryID,SubCatID,AccessoryName,AccessoryDescription,Accessory
RegularPrice,AccessorySalePrice,AccessoryStockQuantity
> FROM Products WHERE CategoryID="& CatID &" and
> SubCatID="& SubCat &" "
> %>
>
> There is error coming in the script,its about sql but
> I dont see any error in my sql statement.
> The error is:
> Microsoft OLE DB Provider for ODBC Drivers error
> '80040e14'
> [Microsoft][ODBC Microsoft Access Driver] Syntax error
> (missing operator) in query expression 'CategoryID=1
> and SubCatID='.
>
> /ramy/accessory.asp, line 179
> ============================================
> Any Idea about this
> Help needed
> Thanks
> Regards
> --Arshad--
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Sports - Coverage of the 2002 Olympic Games
> http://sports.yahoo.com
>
$subst('Email.Unsub').
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
Message #5 by Greg Griffiths <greg.griffiths@g...> on Wed, 20 Feb 2002 19:35:29 +0000
|
|
Try :
SubCatID="& SubCatID &" "
instead of
SubCatID="& SubCat &" "
Also, you should test the variables before you use them and use default
values if no data is entered.
At 05:35 20/02/02 -0800, you wrote:
>Hi,
>I am using this code:
><%
> Dim CatID,SubCatID
> CatID = Request.QueryString ("CatID")
> SubCatID = Request.QueryString ("SubCat")
> sSQL = "SELECT
>AccessoryID,CategoryID,SubCatID,AccessoryName,AccessoryDescription,AccessoryRegularPrice,AccessorySalePrice,AccessoryStockQuanti
ty
>FROM Products WHERE CategoryID="& CatID &" and
>SubCatID="& SubCat &" "
>%>
>
>There is error coming in the script,its about sql but
>I dont see any error in my sql statement.
>The error is:
>Microsoft OLE DB Provider for ODBC Drivers error
>'80040e14'
>[Microsoft][ODBC Microsoft Access Driver] Syntax error
>(missing operator) in query expression 'CategoryID=1
>and SubCatID='.
>
>/ramy/accessory.asp, line 179
>============================================
>Any Idea about this
>Help needed
>Thanks
>Regards
>--Arshad--
>
>
>__________________________________________________
>Do You Yahoo!?
>Yahoo! Sports - Coverage of the 2002 Olympic Games
>http://sports.yahoo.com
>
|
|
 |