That worked. Thanks I tried to incorporate the same type of code to the example below but I also get an error on this.
MySQL: --------- <cfquery name="Update" datasource="prefs"> UPDATE tblProfiles SET strSelect="#ListGetAt(commalist,1,'|')#" </cfquery> Access: ---------- <cfquery name="Update" DATASOURCE="prefs" dbtype="ODBC"> UPDATE tblProfiles (strSelect) VALUES('#ListGetAt(commalist,1,'|')#') </cfquery> On Tue, 21 Jan 2003 13:53:41 +0100, Pascal Peters wrote: > <cfquery name="update_alias" DATASOURCE="alias" dbtype="ODBC"> > INSERT INTO alias (env_var,destination) > VALUES('#ListGetAt(Line,1,"|")#','#ListGetAt(Line,2,"|")#') > </cfquery> > > -----Original Message----- > From: FlashGuy [mailto:[EMAIL PROTECTED]] > Sent: dinsdag 21 januari 2003 13:49 > To: CF-Talk > Subject: Updating database > > > Hi, > > I have this code that updated my MySQL database successfully. I'm > testing this out on another PC with just Access. WHen I try to update > the database I get the following > error? > > Error Occurred While Processing Request > > Error Diagnostic Information > > ODBC Error Code = 37000 (Syntax error or access violation) > > [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO > statement. > > Below is my query for my MySQL database. Is the syntax different for MS > Access? > > <cfquery name="update_alias" DATASOURCE="alias" > dbtype="ODBC"> > INSERT alias > SET > env_var="#ListGetAt(Line,1,'|')#", > destination="#ListGetAt(Line,2,'|')#" > </cfquery> > > > > > > --------------------------------------------------- > Colonel Nathan R. Jessop > Commanding Officer > Marine Ground Forces > Guatanamo Bay, Cuba > --------------------------------------------------- > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4