jwcolby
jwcolby at colbyconsulting.com
Wed Jan 23 14:52:16 CST 2008
It sure sounds that way. LOVE those reserved words. John W. Colby Colby Consulting www.ColbyConsulting.com -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark A Matte Sent: Wednesday, January 23, 2008 3:33 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] SQL INSERT Question_SOLVED??? I HATE COMPUTERS TODAY!!!!!!!!!!!!!!!!!!!!!!!!! Rocky, 1 of my programs uses the same syntax to update a memo field...so I took your example and very easily re-created your error...which confused me, since they were so similar and did exactly the same thing...and mine ran... ...so I started getting rid of things I knew worked...even changing table names to something shorter...then I was left with only 1 thing I had not changed,,,so my logic told me this MUST be the problem...so I changed it...and the error was no more. Million Dollar answer: I changed the field name From Note...to Notes. Maybe Note is a reserved word? Thanks, Mark A. MAtte > From: rockysmolin at bchacc.com > To: accessd at databaseadvisors.com > Date: Wed, 23 Jan 2008 11:44:26 -0800 > Subject: Re: [AccessD] SQL INSERT Question > > One more thing - the field RS(10) is of type nvarchar and can be up to > 4000 characters in length. > > Rocky > > > > > > > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky > Smolin at Beach Access Software > Sent: Wednesday, January 23, 2008 11:08 AM > To: 'Access Developers discussion and problem solving' > Subject: [AccessD] SQL INSERT Question > > I have a client who write a lot of his own stuff. Right now he's > trying to insert into an Access table memo field using the following: > > DoCmd.RunSQL "INSERT INTO tEvictionCasesTemp1 ( UDCaseID, Note ) " & _ > "SELECT " & RS(0) & ", '" & RS(10) & "'" > > which generates the error: "Syntax error in INSERT INTO statement" > > RA(n) are the fields in a recordset hooked to SQL database. The fields > RS(0) and RS(10) contain god data (he checked) with no embedded quotes > or apostrophes. Although he says that he needs to be able to > > > The target field Note is a memo field in the Access table. RS(0) has > already been successfully inserted into tEvictionCasesTemp1. > > What might be causing the syntax error? > > MTIA > > Rocky > > > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.5.516 / Virus Database: 269.19.8/1236 - Release Date: > 1/21/2008 > 8:23 PM > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com _________________________________________________________________ Shed those extra pounds with MSN and The Biggest Loser! http://biggestloser.msn.com/ -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com