in reply to Re^2: DBI, unicode, ms sql server
in thread DBI, unicode, ms sql server

Don't inline Unicode values (in fact, don't inline ANY values) in your SQL. Always use placeholders, i.e. my $sth=$dbh->prepare("insert into XXX values (?,?)"; $sth->execute("\x{2345}\x{3333}","\x{4711}"); $sth->finish(); or $dbh->do("insert into XXX values (?,?)",undef,"\x{2345}\x{3333}","\x{4711}");. Inline values prevent SQL caching, inline values open security holes (SQL injection), inline values break Unicode.

See also the second paragraph under "Problems" in DBD-ODBC-1.18/README.af

Alexander Foken

Replies are listed 'Best First'.
Re^4: DBI, unicode, ms sql server
by zod (Scribe) on Feb 08, 2009 at 16:58 UTC
    Thanks for the info.