Group is a reserved word. Change the table name to something else and it
will work.
----- Original Message -----
From: "Cassie Dove" <[EMAIL PROTECTED]>
To: "CF-Server" <[EMAIL PROTECTED]>
Sent: Thursday, May 24, 2001 12:34 PM
Subject: Help on small bit of code
> OK I may be a newbie here,
> but I have a question. I keep on getting an error from my database code
is
> below and the error is:
>
> OLEDB Error Code = 156
> Incorrect syntax near the keyword 'group'
> SQL = "SELECT * FROM dbo.Group"
> Datasource="pubcitizen"
>
> The error occured whie processing an element with a general identifier of
> (CFQUERY), occupying docuement positon (19:1) to (19:79 in the template
file
>
> Please advise on the code below.. am i totally off base, also I know I
> haven't addressed the subgroup yet either... will do that once I fix this.
>
>
> <CFQUERY name="get_grouplist" dataSource="pubcitizen" maxRows=1
> DBTYPE="OLEDB">
> SELECT *
> FROM dbo.Group
> </CFQUERY>
> <html>
> <head>
> <title>Admin Screen</title>
> </head>
>
> <body>
>
> <H3>Article Manager</h3>
>
> <FORM ACTION="articlemgrprocess.cfm" METHOD="post">
> <INPUT TYPE="hidden" NAME="method" VALUE='#method#'>
> <TABLE BORDER="0" CELLPADDING="2" CELLSPACING="0">
> <TR>
> <TD><B>Article Title:</b>
> </td>
> <TD><INPUT TYPE="text" NAME="article_title" SIZE="100"></td></tr>
> <TD><B>Article Description:</b>
> </td>
> <TD><INPUT TYPE="text" NAME="article_desc" SIZE="150"></td></tr>
> <TD><B>Group ID:</b>
> </td>
> <TD>
> <SELECT NAME="groupID">
> <OPTION VALUE="">
> <CFOUTPUT QUERY="get_grouplist">
> <OPTION VALUE="#get_grouplist.groupID#">
> #listgroup.group_name#</OPTION>
> </cfoutput>
> </select>
> </td>
> </tr>
> <TR><TD><B>
> <B>Group Sub ID:</b>
> </td>
> <TD>
> <SELECT NAME="group_subID">
> <OPTION VALUE="">
> <CFOUTPUT QUERY="subgroup">
> <OPTION VALUE="#subgroup.group_subID#">
> #subgroup.sub_name#</OPTION>
> </cfoutput>
> </select>
> </td>
> </tr>
> </b></td>
> <TR>
> <TD>
> <B>Linked Article? <INPUT TYPE="radio" VALUE="true" NAME="linked"checked>
> </b></td></tr>
> <TR>
> <TD>
> <B>Archived Article? <INPUT TYPE="radio" VALUE="true"
> NAME="archived"checked>
> </b></td></tr>
> <TR>
> <TD>
> <B>Syndicated Article? <INPUT TYPE="radio" VALUE="true"
> NAME="syndicate"checked>
> </b></td></tr>
> <TR>
> <TD><B>Date Created:</b>
> </td>
> <TD><INPUT TYPE="datetime" NAME="date_created" SIZE="20"></td></tr>
> <TR>
> <TD><B>Expiration Date:</b>
> </td>
> <TD><INPUT TYPE="datetime" NAME="expiration_date" SIZE="20"></td></tr>
> <TR>
> <TD><B>Last modify date:</b>
> </td>
> <TD><INPUT TYPE="datetime" NAME="last_mod_date" SIZE="20"></td></tr>
> <TR>
> <TD><B>Person Modified Article:</b>
> </td>
> <TD><INPUT TYPE="text" NAME="last_mod_by" SIZE="50"></td></tr>
> <TR>
> <TD><B>URL of article:</b>
> </td>
> <TD><INPUT TYPE="text" NAME="ulr" SIZE="50"></td></tr>
> <TD><INPUT TYPE="submit" VALUE='#method#'></td>
>
>
>
> </table></form>
>
> </table>
>
> </body>
> </html>
>
>
> Cassie Dove, Programmer
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
------------------------------------------------------------------------------
To unsubscribe, send a message to [EMAIL PROTECTED] with
'unsubscribe' in the body or visit the list page at www.houseoffusion.com