ID: 15771
Updated by: [EMAIL PROTECTED]
Reported By: darkwings at 263 dot net
-Status: Feedback
+Status: No Feedback
Bug Type: Feature/Change Request
Operating System: windows
PHP Version: 5CVS
Assigned To: wez
New Comment:
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
Previous Comments:
------------------------------------------------------------------------
[2004-09-20 12:36:15] [EMAIL PROTECTED]
please try PHP 5.0.1 and let us know if this works
------------------------------------------------------------------------
[2003-11-17 22:36:40] [EMAIL PROTECTED]
Wez, please check this one out.
------------------------------------------------------------------------
[2002-03-12 06:15:05] darkwings at 263 dot net
i think it is not necessary to rewrite,just use a function
like binarywrite() in asp(Active Server Page),
int binarywrite ($variant,$source)
return the length copied.
------------------------------------------------------------------------
[2002-03-11 13:04:50] [EMAIL PROTECTED]
hmm, this is a bit difficult because strings become usually translated
into unicode which is usually a good thing(tm) but unfortunatelly not
in this case.
as i'm actually rewriting the whole thing for php5/ZE2 i don't think
that i'll address this yet.
harald
ps: don't use ado, it's sloooooooooooow :)
------------------------------------------------------------------------
[2002-02-27 21:29:09] darkwings at 263 dot net
Since PHP can support COM and I usually use php in windows,
I try to use database like mssql through ado.
All things work properly but the image datatype of mysql cannot be set
correctly.
I use it just like this
<?
$dbconn=new COM("ADODB.Connection") or die ("connection create fail");
$dbconn->Open("Provider=sqloledb;Data Source=ndht;Initial
Catalog=printers;User Id=printers;Password=printers;");
$fp=fopen("5.gif","r") or die ("file opening error");
$content = fread ($fp, filesize ("5.gif"));
fclose ($fp);
echo filesize ("5.gif");
$rec=new COM("ADODB.recordset");
$rec->open("select * from sav",$dbconn);
$rec->addnew();
$rec->fields["datas"]->AppendChunk($content);
$rec->update();
$rec->close();
$rec=null;
$dbconn->close();
$dbconn=null;
?>
I think that windows use two type text for strings and binary for the
8bit chars, but in php string are both of
these.
So when trans the data to mssql,the variables be string of
window first, and the information were lost.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=15771&edit=1