php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8361 Chinese char changed & ADODB.command,recordset can not be used
Submitted: 2000-12-21 13:52 UTC Modified: 2001-02-26 05:02 UTC
From: steeven at kali dot com dot cn Assigned: phanto (profile)
Status: Closed Package: COM related
PHP Version: 4.0.3pl1 OS: windows98/me
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: steeven at kali dot com dot cn
New email:
PHP Version: OS:

 

 [2000-12-21 13:52 UTC] steeven at kali dot com dot cn
I have setup PHP to work with ADO, but they would't work:

$dbc = new COM("ADODB.Connection");
$dbc->Provider = "sqloledb";
$dbc->Open('DSN=starmate;Database=magway;UID=sa;PWD='); //OK
$q="select title from css";

//1. command object
$cm= new COM("ADODB.Command");
$cm->CommandText=$q;
$cm->ActiveConnection=$dbc; //PropPut() failed!!!
$rs=$cm->Execute();	//Invoke() failed!!!
//

//2. recordset still don't work
$rs=new COM("ADODB.Recordset");
$rs->Open($q); //Invoke() failed!!!

//only this code will work
$rs=$dbc->Execute($q); 
echo $rs->fields[0]->value . "<br>";


On the other hand, all the Double byte char input/output will be cut to 1byte. ????a will be changed to 3 byte char.
Test with ADODB,Word, It seemed that windows report chinese as one char, but php think it one byte.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-01-29 17:17 UTC] phanto@php.net
this should be fixed in cvs

please try a snapshot from http://snaps.php.net and give me feedback.
 [2001-02-02 13:07 UTC] phanto@php.net
could someone with a chinese charset try this please.
 [2001-02-04 00:33 UTC] steeven at kali dot com dot cn
I donwload 4.05dev from www.mm4.de, and run the following code:
<?php
//phpinfo();

$dbc = new COM("ADODB.Connection");
$dbc->Provider = "sqloledb";
$dbc->Open('DSN=starmate;Database=magway;UID=sa;PWD=');
$q="select title from css";
....
....
?>
Here is the result:

Warning: Error in php_char_to_OLECHAR() in d:\apache\htdocs\magway\phorum\test.php on line 4

Warning: Invalid ProgID: ???ַ?????Ч[invalid class string(by me)] in d:\apache\htdocs\magway\phorum\test.php on line 4

Fatal error: Call to undefined function: open() in d:\apache\htdocs\magway\phorum\test.php on line 6


Please tell me what you need to know for more.
 [2001-02-04 06:34 UTC] phanto@php.net
which operating system do you use ?

if you're using windows nt/98/95 and the sources where compiled on win2k this could be the reason. i fix this in the evening.

harald
 [2001-02-04 08:25 UTC] steeven at kali dot com dot cn
thanks! I use WindowsMe(chinese).

I don't know which platform they used to compile php.

please let me know if you finished. thanks!

steeven
 [2001-02-06 19:28 UTC] phanto@php.net
fixed in cvs

you have to wait till they recompile it
 [2001-02-23 20:23 UTC] steeven at kali dot com dot cn
Thank you very very much!
www.mm4.com finally complied the new version,
Every think worked well now :)


 [2001-02-23 20:29 UTC] derick@php.net
Fixed in CVS, so closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 18:01:30 2024 UTC