Forums
This topic is locked
Filters in results page
Posted 30 Oct 2001 03:28:46
1
has voted
30 Oct 2001 03:28:46 Steve Copelin posted:
Is anyone having an issue when you select a filter for the results page?If i choose no filter the results page will work fine. If i have a filter selected it will give the error 'syntax error(missing operator)in query expression.
I'm using an access DB.
Can anyone help?
Replies
Replied 01 Nov 2001 10:15:29
01 Nov 2001 10:15:29 Kevin Abbott replied:
can you show us the SQL code?
Goto server behaviours -> look at the properties of the recordset your having problems with -> click the advanced button.
Copy the code and post it here
Goto server behaviours -> look at the properties of the recordset your having problems with -> click the advanced button.
Copy the code and post it here
Replied 02 Nov 2001 03:37:35
02 Nov 2001 03:37:35 Steve Copelin replied:
Sorry i'm a little new to ud4.
The properties of the record set
SQL SELECT *
FROM Main_tb1
WHERE Stock Receipt number=MMColParam
VARIABLES Name: MMColParam
Default Value: 1
Run-time Value: Request.Query string ("form1"
I'm trying to filter the results by 'stock receipt Number' Its funny it will work without the filter but as sonn as you put a filter on it the error pops up.
If i have pasted the wrong thing i appologise in advance.
This is the results.asp page code
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="Connections/INSERT_DATA.asp" -->
<%
Dim Recordset1__MMColParam
Recordset1__MMColParam = "1"
if (Request.QueryString("form1" <> "" then Recordset1__MMColParam = Request.QueryString("form1"
%>
<%
set Recordset1 = Server.CreateObject("ADODB.Recordset"
Recordset1.ActiveConnection = MM_INSERT_DATA_STRING
Recordset1.Source = "SELECT * FROM Main_tbl1 WHERE Stock Receipt Number = " + Replace(Recordset1__MMColParam, "'", "''" + ""
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 3
Recordset1.Open()
Recordset1_numRows = 0
%>
<html>
<head>
<title>Results</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
</body>
</html>
<%
Recordset1.Close()
%>
The properties of the record set
SQL SELECT *
FROM Main_tb1
WHERE Stock Receipt number=MMColParam
VARIABLES Name: MMColParam
Default Value: 1
Run-time Value: Request.Query string ("form1"
I'm trying to filter the results by 'stock receipt Number' Its funny it will work without the filter but as sonn as you put a filter on it the error pops up.
If i have pasted the wrong thing i appologise in advance.
This is the results.asp page code
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="Connections/INSERT_DATA.asp" -->
<%
Dim Recordset1__MMColParam
Recordset1__MMColParam = "1"
if (Request.QueryString("form1" <> "" then Recordset1__MMColParam = Request.QueryString("form1"
%>
<%
set Recordset1 = Server.CreateObject("ADODB.Recordset"
Recordset1.ActiveConnection = MM_INSERT_DATA_STRING
Recordset1.Source = "SELECT * FROM Main_tbl1 WHERE Stock Receipt Number = " + Replace(Recordset1__MMColParam, "'", "''" + ""
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 3
Recordset1.Open()
Recordset1_numRows = 0
%>
<html>
<head>
<title>Results</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
</body>
</html>
<%
Recordset1.Close()
%>