List:MySQL on Win32« Previous MessageNext Message »
From:Greg Quinn Date:January 19 2005 5:43pm
Subject:Re : illegal characters in sql?
View as plain text  
Hi Mark,

I used Visual Basic as well with MYSQL, the only way I managed to escape \ 
and ' characters was with a function like this...

Value = Replace(Value , "'", "''")
Value = Replace(Value , "\", "\\")

Funny enough, replacing ' with \' Didn't work for me as others have 
specified...

-----Original Message-----
From: Mark Mchugh <mark_mch@stripped>
To: mysql list,
Sent: 1/19/2005 6:38:09 PM
Subject: illegal characters in sql?

Hi,
I am getting a syntax error using the following sql
from within a visual basic project,

sqlstr = "update policies set dirs = 'z:\' where id =
2"


i cant see what is wrong, can somebody help?

thanks in advance 


Thread
Re : illegal characters in sql?Greg Quinn19 Jan