Click to See Complete Forum and Search --> : Syntax error


Capricorn
10-27-2003, 11:05 PM
I have this error:

Error Type:
Microsoft JET Database Engine (0x80040E14)
Syntax error in FROM clause.

My codes is:

Dim path

path = "C:\Inetpub\wwwroot\MyProj\XMLDATA\FLASH\"

sql = "Select * FROM flash WHERE" & path & "file_name = '" & Request.Form("fileload") & "'"

Can someone help me fix this error asap?thanks

rdoekes
10-28-2003, 05:09 AM
Do you have a field name in the table flash called
"C:\Inetpub\wwwroot\MyProj\XMLDATA\FLASH\file_name"?
If that's the case then your sql statement should read:

sql = "Select * FROM flash WHERE " & _
path & "file_name = '" & _
Request.Form("fileload") & "'"
(one space after WHERE inserted)

-Rogier Doekes