DBI problem inserting html into mssql db

K

Kristian

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
me.

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.

Regards

Kristian
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top