--------------2E9BE6F4AE52820C8132DE58
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Text is a reserved word. You need to change the name of the table.
Annette
Hubert Earl wrote:
> Hi,
>
> I'm trying to build a dynamically filled drop down select box. However, I
> keep getting an error message which I cannot resolve, and I'd appreciate
> some advice. The error message is:
>
> "ODBC Error Code = 37000 (Syntax error or access violation)
>
> [Microsoft][ODBC Microsoft Access Driver] Syntax error in FROM clause.
>
> SQL = "SELECT JokeTitle FROM Text"
> Data Source = "Jokes"
>
> The error occurred while processing an element with a general identifier of
> (CFQUERY), occupying document position (1:1) to (3:14). "
>
> The code for the form is below. Please note that the name of the table is
> 'text'.
>
> <CFQUERY
> DATASOURCE="Jokes"
> NAME="Titles">
>
> SELECT JokeTitle
> FROM Text
> </CFQUERY>
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
>
> <html>
> <head>
> <title>Jokes</title>
> </head>
>
> <body>
>
> <h1>JOKES</h1>
>
> <FORM ACTION="jokesaction.cfm" METHOD="POST">
>
> Please select the joke titles from the contents of the select boxes below.
> You may select up to five titles at a time.
>
> Joke title #1:
> <SELECT NAME="JokeTitle">
> <OPTION>
>
> <CFOUTPUT QUERY="Titles">
> <OPTION VALUE="#JokeTitle#">#Titles#
> </cfoutput>
> </select>
> </FORM>
> </body>
> </html>
>
> Thanks.
>
> Sincerely,
> ---
> Hubert Earl
> ICQ#: 16199853
>
> I develop & maintain web sites internationally. I also build web
> applications using CGI scripts written in Perl. I accept subcontracting
> work.
>
> **Personal web site: http://www.geocities.com/SiliconValley/Peaks/8702/
> (please remember to view this with a sense of humour!)
>
> **Business web page: http://home.talkcity.com/MigrationPath/hearl/
>
> ------------------------------------------------------------------------------
> Archives: http://www.eGroups.com/list/cf-talk
> To Unsubscribe visit
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
>message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
--------------2E9BE6F4AE52820C8132DE58
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
Text is a reserved word. You need to change the name of the table.
<P>Annette
<P>Hubert Earl wrote:
<BLOCKQUOTE TYPE=CITE>Hi,
<P>I'm trying to build a dynamically filled drop down select box.
However, I
<BR>keep getting an error message which I cannot resolve, and I'd appreciate
<BR>some advice. The error message is:
<P>"ODBC Error Code = 37000 (Syntax error or access violation)
<P>[Microsoft][ODBC Microsoft Access Driver] Syntax error in FROM clause.
<P>SQL = "SELECT JokeTitle FROM Text"
<BR>Data Source = "Jokes"
<P>The error occurred while processing an element with a general identifier
of
<BR>(CFQUERY), occupying document position (1:1) to (3:14). "
<P>The code for the form is below. Please note that the name of the
table is
<BR>'text'.
<P><CFQUERY
<BR>DATASOURCE="Jokes"
<BR>NAME="Titles">
<P>SELECT JokeTitle
<BR>FROM Text
<BR></CFQUERY>
<P><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<P><html>
<BR><head>
<BR> <title>Jokes</title>
<BR></head>
<P><body>
<P><h1>JOKES</h1>
<P><FORM ACTION="jokesaction.cfm" METHOD="POST">
<P>Please select the joke titles from the contents of the select boxes
below.
<BR>You may select up to five titles at a time.
<P>Joke title #1:
<BR><SELECT NAME="JokeTitle">
<BR><OPTION>
<P><CFOUTPUT QUERY="Titles">
<BR><OPTION VALUE="#JokeTitle#">#Titles#
<BR></cfoutput>
<BR></select>
<BR></FORM>
<BR></body>
<BR></html>
<P>Thanks.
<P>Sincerely,
<BR>---
<BR>Hubert Earl
<BR>ICQ#: 16199853
<P>I develop & maintain web sites internationally. I also build
web
<BR>applications using CGI scripts written in Perl. I accept subcontracting
<BR>work.
<P>**Personal web site: <A
HREF="http://www.geocities.com/SiliconValley/Peaks/8702/">http://www.geocities.com/SiliconValley/Peaks/8702/</A>
<BR>(please remember to view this with a sense of humour!)
<P>**Business web page: <A
HREF="http://home.talkcity.com/MigrationPath/hearl/">http://home.talkcity.com/MigrationPath/hearl/</A>
<P>------------------------------------------------------------------------------
<BR>Archives: <A
HREF="http://www.eGroups.com/list/cf-talk">http://www.eGroups.com/list/cf-talk</A>
<BR>To Unsubscribe visit <A
HREF="http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk">http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk</A>
or send a message to [EMAIL PROTECTED] with 'unsubscribe'
in the body.</BLOCKQUOTE>
</HTML>
--------------2E9BE6F4AE52820C8132DE58--
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.