php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6831 COM does not support variant type 1 (NULL)
Submitted: 2000-09-21 11:06 UTC Modified: 2001-01-30 19:04 UTC
From: jlim at natsoft dot com dot my Assigned: phanto (profile)
Status: Closed Package: COM related
PHP Version: 4.0.2 OS: Win98
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: jlim at natsoft dot com dot my
New email:
PHP Version: OS:

 

 [2000-09-21 11:06 UTC] jlim at natsoft dot com dot my
Currently, COM does not support variant type 1. This is type NULL.

This should be easy to fix as we can make it equivalent to false. Does PHP support null as a constant?

The bug can be replicated by accessing a database with nulls in the records using ADO.

<?
        $dbc = new COM("ADODB.Connection");
        $dbc->open ("driver={Microsoft Access Driver (*.mdb)};dbq=d:/test/DB/guestbook.mdb;uid=Admin");
        $rs = $dbc->Execute("select * from guestbook");
        $i = 0;
        while (!$rs->EOF) {
                $i += 1;
                $fld0 = $rs->Fields(0);
                $fld1 = $rs->Fields(1);
                $fld2 = $rs->Fields(2);
                print "$fld0->value $fld1->value $fld2->value<BR>";
                $rs->MoveNext();
        }
        $rs->Close();
?>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-12-18 04:36 UTC] jlim at natsoft dot com dot my
Here's hoping for a quick fix :-) PHP 4.03pl1 also exhibits the above bug.

Just tested COM again and discovered variant type 6 (currency) is not supported either. 

Thanks again. 
 [2001-01-29 17:21 UTC] phanto@php.net
working on it
 [2001-01-30 19:04 UTC] phanto@php.net
fixed in cvs

use is_null() to check if the returned value is NULL;
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Fri May 24 02:01:25 2019 UTC