4 messages in com.mysql.lists.win32Re: illegal characters in sql?
FromSent OnAttachments
Mark Mchugh19 Jan 2005 08:30 
Tom Crimmins19 Jan 2005 08:40 
Ian Gibbons19 Jan 2005 08:42 
Annemarie Mayer19 Jan 2005 08:48 
Subject:Re: illegal characters in sql?
From:Ian Gibbons (mys@fishnet.co.uk)
Date:01/19/2005 08:42:21 AM
List:com.mysql.lists.win32

On 19 Jan 2005 at 8:30, Mark Mchugh wrote:

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 =

The slash character is used to 'escape' other special characters.

For example if you want to insert a single quote into a string field you would
use:

INSERT into table_name ( string_field) VALUES ( 'Mr O\'rielly');

See:

http://dev.mysql.com/doc/mysql/en/String_syntax.html

for more information on escape characters.

Too correct the above statement use:

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

Regards

Ian