473,385 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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
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
Jul 19 '05 #1
0 1934

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Jared Evans | last post by:
I developed a console application that will continually check a message queue to watch for any incoming data that needs to be inserted into MS SQL database. What would be a low-cost method I...
4
by: Ria Van Heerden | last post by:
How do I insert data from one form into two tables in a database? I am working with ASP pages and a MSSQL database Please let me know if one of you have done this before and how this is...
0
by: sherif | last post by:
Hi, I'm making an application using C# and i connect through it to a database made by MSSQL server but i have a problem when inserting or updating in the database in arabic that each arabic...
3
by: darrel | last post by:
I'm using parameterized sql for my Db updates and typically use something like this: objCommand.Parameters.Add("@pageID", System.Data.OleDb.OleDbType.numeric).Value = 24 However, I now need...
2
by: Igal | last post by:
I'm trying to insert a date value into MSSQL, the type of the sql filed is: "smalldatetime" and i'm trying to insert a text Variable that looks like this: "19/02/2006". .... SET update_date='"...
3
Atli
by: Atli | last post by:
Hi. I've been trying to insert multiple rows into a table using a single INSERT statement in MSSQL / SQL Server 2005. I could of course cheat and have my C# code insert each row using some sort...
3
by: Robert Johnson | last post by:
Hi all. Created a simple table in my db. 3 colums one is a Int set for autoincrement. Itentity True, seed 1, Incremement 1, null False. The other colums are simple VarChar(50) null false on the...
9
by: kencana | last post by:
Hi All, I have some problem in inserting date and time entered by user from the GUI into the form. Any idea on how this can be done? Thank you Regards, Kencana
7
by: omeek | last post by:
I'm new to MSSQL (Have used MySQL for a little while) and am completely stuck. I have searched the net for days now and am amazed at how little info is out there for MSSQL. I am selecting multiple...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.