470,810 Members | 866 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,810 developers. It's quick & easy.

DBI problem inserting html into mssql db

Hi Guys,
I have a script that has to insert an var containing a html string
into my microsoft sql server, and it keeps throwing the same error at

DBD::ODBC::db do failed: [Microsoft][ODBC SQL Server Driver][SQL
Server]Line 89:
Incorrect syntax near 'Tryk'. (SQL-42000)(DBD: Execute immediate
failed err=-1)
at spider.pl line 175.

The 'Tryk' is part of the html string.
As far as I know, the problem is that I have to be able to handle
chars like ,, inside my html string. To cope with this problem I
have used the following:

use Unicode::String qw(utf8 latin1 utf16);
$vacancy = latin1( $html );
my $T = $vacancy->latin1;

$dbh -> do( qq{
UPDATE offer SET Description = '$T'
} ) or die "AARGGHH line 180 $DBI::errstr \n";

and this throws the error above at me constantly.


Jul 19 '05 #1
0 1876

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Ria Van Heerden | last post: by
3 posts views Thread by Robert Johnson | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.