Microsoft
Software
Hardware
Network
Question : How to write SQL with string containing an apostrophe
This statment works fine until the 'SelectedCompany' contains an apostrophe
SQLstatement = "SELECT * " _
& "FROM tbContactsNonClients " _
& "WHERE Company = '" & SelectedCompany & "';"
How do I accomodate a string with an apostrophe since I'm using the 'single quotes' to avoid conflict among the "double quotes"?
Answer : How to write SQL with string containing an apostrophe
you can do this
SQLstatement = "SELECT * " _
& "FROM tbContactsNonClients " _
& "WHERE Company = " & chr(34) & SelectedCompany & chr(34)
Random Solutions
RS-485 Serial Communications
SQL Query
Multiple Instances??
Application Settings are not functioning
2 questions about messagequeue
how to create crystal report programmatically using vs 2005 ide?
Oracle REF CURSOR in Excel VBA
MOSS C# Console application - How do I create a document Library
return an email object's guid
Connect to a Crosstab query in Access from Excel