Thread View: comp.databases.ms-access
2 messages
2 total messages
Started by Christo du Toit
Thu, 24 May 2001 22:41
SQL Select query for Access2000
Author: Christo du Toit
Date: Thu, 24 May 2001 22:41
Date: Thu, 24 May 2001 22:41
30 lines
2100 bytes
2100 bytes
Hi
I am writing an ASP query to retrieve data from an access database file
The ASP query looks as follows:
<form
METHOD="GET" ACTION="SMS%20Word%20Query.asp">
<p>Search for: <input TYPE="Text" NAME="[Search for:]" size="20"></p>
<p><input TYPE="Submit" VALUE="Run Query"> </p>
</form>
[The search for:] variable must then be handed over to another ASP file that
will do the query.
The query looks like this:
sql = "SELECT SMS.Date, SMS.SMS FROM SMS WHERE (((SMS.SMS) Like
'*'+" & Request.QueryString("[Searc") & "h for:]+'*')) "
The sql= "SELECT... was generated by access 2000 but when i try it out on
the webserver I get the following error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing
operator) in query expression '(((SMS.SMS) Like '*'+h for:]+'*'))'.
/kiewiet/DailySMS/SMS Word Query.asp, line 31
Can anyone maybe help me out with the correct syntax?
Thanks
Christo
Re: SQL Select query for Access2000
Author: Bruce Dodds
Date: Fri, 25 May 2001 21:12
Date: Fri, 25 May 2001 21:12
46 lines
2664 bytes
2664 bytes
Christo-
Try this:
sql = "SELECT SMS.Date, SMS.SMS FROM SMS WHERE (((SMS.SMS) Like '*"
+ Request.QueryString("[Search for:]") + "*'))"
I am not an ASP expert, but see how it goes. It looks as though part of
the problem at least is that your close quotes are in the wrong spot.
Good luck!
Bruce
Christo du Toit wrote:
>
> Hi
>
> I am writing an ASP query to retrieve data from an access database file
>
> The ASP query looks as follows:
> <form
> METHOD="GET" ACTION="SMS%20Word%20Query.asp">
> <p>Search for: <input TYPE="Text" NAME="[Search for:]" size="20"></p>
> <p><input TYPE="Submit" VALUE="Run Query"> </p>
> </form>
>
> [The search for:] variable must then be handed over to another ASP file that
> will do the query.
> The query looks like this:
>
> sql = "SELECT SMS.Date, SMS.SMS FROM SMS WHERE (((SMS.SMS) Like
> '*'+" & Request.QueryString("[Searc") & "h for:]+'*')) "
>
> The sql= "SELECT... was generated by access 2000 but when i try it out on
> the webserver I get the following error:
>
> Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
> [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing
> operator) in query expression '(((SMS.SMS) Like '*'+h for:]+'*'))'.
> /kiewiet/DailySMS/SMS Word Query.asp, line 31
>
> Can anyone maybe help me out with the correct syntax?
>
> Thanks
> Christo
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads