Results 1 to 4 of 4
  1. #1
    jimf is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2015
    Posts
    2

    French characters in an Insert statement

    Hi,


    i'm trying to execute an insert statement from an ASP.Net form page such as:
    insert into documents (Name,NameFrench,Message,MessageFrench) values('info','information','See details ','Voir l'affiche pour des détails');

    I get an exception on the insert statement.

    If I copy the statement directly into a test query in the database, I get the following error: Syntax error (missing operator) in query expression "Voir l'affiche .... "


    The insert dies on the " l'affiche " word. I need the those french characters in the database as they are pulled from those fields and are required to be displayed with the proper accent characters.

    Does anyone know of a way to escape the French special characters?

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    You can't use single quotes to insert a word that has a single quote in the word.
    surround it with double quotes.

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Code:
    insert into documents
     (Name,NameFrench,Message,MessageFrench)  
    values('info','information','See details ','Voir l''affiche pour des  détails')
    You can double (use 2 quotes) to tell Access you want the quote as part of the data, not syntax to delimit a string.

  4. #4
    jimf is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2015
    Posts
    2
    Thanks Guys,
    both solutionswill work fine.


    This thread can be closed.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Update error (3144) on French Access version
    By Euler in forum Programming
    Replies: 13
    Last Post: 02-04-2015, 02:41 PM
  2. INSERT statement
    By GraeagleBill in forum Programming
    Replies: 2
    Last Post: 03-29-2013, 12:53 PM
  3. Replies: 1
    Last Post: 11-09-2012, 01:48 PM
  4. Insert Into statement
    By TimMoffy in forum Programming
    Replies: 7
    Last Post: 07-13-2012, 07:10 AM
  5. Insert statement
    By crowegreg in forum Programming
    Replies: 2
    Last Post: 08-19-2011, 02:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums