I'm in a quandary here.  Here is the query that is giving me fits:


 <CFQUERY name="buyplayer" datasource="#attributes.DSN#">
  UPDATE members
  SET playerslot#attributes.slot# = #attributes.PID#
  WHERE MID = #currentuser.MID#
 </cfquery>

The error I get when the program gets to this part:

[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in
query expression '4'.


The 4 in question is the attributes.PID..   The thing is, if I go into the
code and manually change that #attributes.PID# into a 4, or any integer, the
query works fine.  Somehow the query pulls these single quotes out of its
ass when it's dealing with it as a variable.  I can see why if the number
has quotes around it, it would crash, because the PID field in the database
is AutoNumber, not text.  So my question is where are those quotes coming
from??!!

I hope that made sense.  Any help would be much appreciated.






~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to