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
assigning select results to a variable
Setting Up SMTP Mail Service on Windows XP
sql: issue checking if character is in number range
Rename using date and Time
Color handling of a CEdit !
Open Sharepoint server's pdf file in asp.net...
vmm32\bios.vxd
Why public network is the highest in the binding order?
Formatting columns in SSRS Report Builder
Wait Till Queries Have Refreshed