php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20852 Why Can't insert chinese into MS-ACCESS by COM
Submitted: 2002-12-05 21:42 UTC Modified: 2003-01-02 08:56 UTC
From: pzou at 163 dot com Assigned:
Status: Not a bug Package: COM related
PHP Version: 4.2.2 OS: win2000
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: pzou at 163 dot com
New email:
PHP Version: OS:

 

 [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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-12-18 13:56 UTC] kalowsky@php.net
COM != ODBC.  Re-classifying.
 [2002-12-18 14:03 UTC] wez@php.net
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.
 [2002-12-18 14:12 UTC] kalowsky@php.net
marking as feedback as per Wez's suggestion
 [2003-01-02 08:56 UTC] phanto@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 02:01:29 2024 UTC