Hi Everyone,
I am hoping someone can help me out here. I am having a problem getting some text into a MSSQL DB correctly using the following CGI script (i tried to trim it down to just the essentials).
I see the correct data on the web page as follows: insQry: exec ins_result N'testこんにちはtest'use CGI; use DBI; my $test = 'testこんにちはtest'; print "Content-type: text/plain; charset=utf8\n\n"; my $dbproc = DBI->connect("DBI:ODBC:*********","*******", "*****", + { PrintError => 0, RaiseError => 1, ChopBlanks => 1 } ) || print "un +able to insert record $DBI::errstr"; my $insQry = "exec ins_result N'".$test;."'"; print "insQry: $insQry\n\n"; my $sth = $dbproc->prepare($insQry); $sth->execute; $dbproc->disconnect || print "unable to insert record $DBI::errstr +";
but when i check the DB i see the following was inserted into the table:
mikeSkaotest
Environment details are:
OS: Red Hat Enterprise Linux Client release 5.9 (Tikanga)
DB Microsoft SQL Server 2005
Apache: Apache/2.0.50
Perl: 5.10.0
Any help would be greatly appreciated.
Thanks,
Mike
In reply to Help inserting Kanji in MSSQL DB by michaeldhenry
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |