#20852 [Opn]: Why Can't insert chinese into MS-ACCESS by COM

From: Date: Wed, 18 Dec 2002 20:03:49 +0000
Subject: #20852 [Opn]: Why Can't insert chinese into MS-ACCESS by COM
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-27993@lists.php.net to get a copy of this message
ID: 20852 Updated by: wez@php.net Reported By: pzou@163.com Status: Open Bug Type: COM related Operating System: win2000 PHP Version: 4.2.2 New Comment: Sounds like a bogus COM problem to me: Try this: $conn = new COM("ADODB.Connection", null, $codepage); where $codepage is the code page number that will be used when converting strings to unicode. Previous Comments: ------------------------------------------------------------------------ [2002-12-18 13:56:31] kalowsky@php.net COM != ODBC. Re-classifying. ------------------------------------------------------------------------ [2002-12-05 21:42:08] pzou@163.com Why Can't insert chinese into MS-ACCESS by COM ?? ---------------------------------------------------------- Example: $conn = new COM("ADODB.Connection") or die("ADO connect failed!"); $rs = new COM("ADODB.RecordSet") or die("ADO recordset failed£¡"); $conn->open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=test.mdb"); $str="This is a bug!" $rs = $conn->Execute("insert into [Table_A](Contents) values('".$str."');"); --------------------------------------------------------- When i use COM insert the variable $str to column [Contents] of the [Table_A]. I found it only support insert English. When $str is a English string it success. But when $str is a Chinese string it abnormal. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=20852&edit=1

« previous php.bugs (#27993) next »