|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-12-05 21:42 UTC] pzou at 163 dot 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.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 02:00:01 2025 UTC |
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.