Is there a VB6 function like mysql_real_escape_string?
Is 开发者_如何学运维there a function in VB6 analagous to mysql_real_escape_string
I can use to escape strings for an access database, to prevent things like newlines and double quotes from wrecking the insert statements?
The strings concerned are hard-coded in the application so SQL injection is not a concern.
'Fraid not, you can either use Replace$()
to escape quotes yourself, or take advantage of the ADODB Command object's ability to create use parameterized statements which will escape any character data automatically.
精彩评论