quiero comprobar mi correo electronico

  • Thread starter Thread starter kleper carabali
  • Start date Start date
K

kleper carabali

De: "Rocky" <[email protected]>
Asunto: Trouble with Data entry with the name starting with O'B...
Fecha: lunes, 03 de marzo de 2008 15:59

Don't know where to look, but had this problem before. With names like
"O'Brien"? Getting a Syntax error #3077 ( Access database seems like it
doesn't like the apostrophe character ('). Any solution to this problem?
 
Sure: double each apostrophe character (' or single quote) when building
your sql string but only when the delimiter for the string value is itself
the apostrophe, not the double quote. Same thing for double quotes: you
have to double them if the delimiter is itself a double quote:

"... Where Name = '" & Replace ("O'Brien", "'", "''") & "' ...."

Notice that the overal delimiter for the sql string is the double quote (")
but that the inside delimiter around the name value is a single quote; hence
the necessity of doubling the single quote inside the name O'Brien.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top