please help - mysterious extra characters appearing in SQL update
am 24.09.2006 18:06:25 von digger440uk
This is a real strange problem. I have some asp code (javascript) that
sends a simple update sql command to mysql 5.
my sql is this
UPDATE Users SET YouGotMail = -1 WHERE pas_User = 'Clive'
and when it's sent to the database this is the error
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[MySQL][ODBC 3.51 Driver][mysqld-5.0.21-community-nt]You have an error
in your SQL syntax; check the manual that corresponds to your MySQL
server version for the right syntax to use near '{ call
Exectute('UPDATE Users SET YouGotMail = -1 WHERE pas_User = \'Clive\'')
}' at line 1
Backslash characters have some how been inserted into the string. I
know the sql is ok. Works fine in the MySQL Query Browser. I was
wondering if it something to do with language settings but it's
something i'm new too. However the table Users is set up by english
defaults [latin1] and this kind of query is working fine with all my
other tables.
I've been googling for a solution for the last two weeks and i've come
up with nothing. I'm just hoping that someone has had a similar problem
before.
Regards
AndyB
Re: please help - mysterious extra characters appearing in SQL update
am 25.09.2006 00:24:14 von digger440uk
dosy me, helps if i spell execute correctly doesn't it.
looked at that code for over a week.
digger440uk wrote:
> This is a real strange problem. I have some asp code (javascript) that
> sends a simple update sql command to mysql 5.
>
> my sql is this
> UPDATE Users SET YouGotMail = -1 WHERE pas_User = 'Clive'
>
> and when it's sent to the database this is the error
>
> Error Type:
> Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
> [MySQL][ODBC 3.51 Driver][mysqld-5.0.21-community-nt]You have an error
> in your SQL syntax; check the manual that corresponds to your MySQL
> server version for the right syntax to use near '{ call
> Exectute('UPDATE Users SET YouGotMail = -1 WHERE pas_User = \'Clive\'')
> }' at line 1
>
> Backslash characters have some how been inserted into the string. I
> know the sql is ok. Works fine in the MySQL Query Browser. I was
> wondering if it something to do with language settings but it's
> something i'm new too. However the table Users is set up by english
> defaults [latin1] and this kind of query is working fine with all my
> other tables.
>
> I've been googling for a solution for the last two weeks and i've come
> up with nothing. I'm just hoping that someone has had a similar problem
> before.
>
> Regards
> AndyB