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
Excel spreadsheet cells are showing up as empty even though there are simple data in them
Microsoft Office Spreadsheet 9.0 control in Access - problem
Let all Users Have the Printer
Error Converting DataType VarChar to Numeric - DataSet - Detail - ToolStripTextBox
Turn off certificate for remote web workplace
SmapLS not found in Kernel32.dll
asp .net: call a sql job?
Error 1327 Invalid Drive - installing applications - "Documents" on network drive - offline file sycn
Event ID 27 Source KDC
Drop all Indexes