I am adjusting a VB6 statement in which the application is making a request from the SQL database and the value contains quotation marks in it. The result is an error: Incorrect syntax near 'value'
The requesting statement from VB6 is:
select count(*), Max(Grouping) from tblOrgHours where Narrative = '" & Text1 & "'"
If Text1 contains quotation marks in it then the error is produced. How can I avoid this?