|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Error: Syntax error in FROM Clause
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14) [Microsoft][ODBC Microsoft Access Driver] Syntax error in FROM clause. ---------------------------------------------------------------------------------- Yes, I know this question has been answered a million times, however, I've already searched through this forum and my problem still hasn't been resolved. Basically, I keep getting the error above whenever I try to execute this code. This code is from a search page entitled search.asp. Here's my code: <%@ Language=VBScript %> <% Option Explicit %> <!--#include file="connect.asp"--> <% Dim rsGlobalWeb, strSQL strSQL = "SELECT * FROM lost LIKE '%" & Request.Form("search") & "%'" Set rsGlobalWeb = objConn.Execute(strSQL) %> Thanks! Last edited by coderX : December 11th, 2003 at 06:46 PM. |
|
#2
|
|||
|
|||
|
You need a WHERE in there somewhere
strSQL = "SELECT * FROM lost WHERE somecolumn LIKE '%" & Request.Form("search") & "%'" somecolumn must be a text or date column for LIKE to work. |
|
#3
|
|||
|
|||
|
What if I don't have any specific columns that I want to search and I want to search every column?
|
|
#4
|
|||
|
|||
|
Never Mind, I figured I really don't need to search every field. Thanks so much! I've been trying to find a solution to this problem for 2 weeks.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > Error: Syntax error in FROM Clause |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|