com没有被起用
什么操作系统?贴出php.ini中com一节的内容

解决方案 »

  1.   

    我试过你的程序,我的错误更多Warning: (null)(): Invoke() failed: 发生意外。 Source: Microsoft OLE DB Provider for ODBC Drivers Description: [Microsoft][ODBC Microsoft Access Driver]常见错误 不能打开注册表关键字 'Temporary (volatile) Jet DSN for process 0x440 Thread 0x8cc DBC 0xc07104 Jet'。 in F:\工作项目\测试\text1.php on line 4Warning: (null)(): Invoke() failed: 发生意外。 Source: ADODB.Recordset Description: 连接无法用于执行此操作。在此上下文中它可能已被关闭或无效。 in F:\工作项目\测试\text1.php on line 6Warning: main(): Unable to lookup Count: 未知名称。 in F:\工作项目\测试\text1.php on line 7Warning: main(): PropGet() failed: 发生意外。 Source: ADODB.Recordset Description: 对象关闭时,操作不被允许。 in F:\工作项目\测试\text1.php on line 8Warning: main(): Invoke() failed: 发生意外。 Source: ADODB.Fields Description: 项目在所需的名称或序数中未被发现。 in F:\工作项目\测试\text1.php on line 11
      

  2.   

    windows2000系统 
    [com]
    ; path to a file containing GUIDs, IIDs or filenames of files with TypeLibs
    ;com.typelib_file = 
    ; allow Distributed-COM calls
    ;com.allow_dcom = true
    ; autoregister constants of a components typlib on com_load()
    ;com.autoregister_typelib = true
    ; register constants casesensitive
    ;com.autoregister_casesensitive = false
    ; show warnings on duplicate constat registrations
    ;com.autoregister_verbose = true
      

  3.   

    xuzuning(唠叨):我的操作系统win2000,
    [com]
    ; path to a file containing GUIDs, IIDs or filenames of files with TypeLibs
    ;com.typelib_file = 
    ; allow Distributed-COM calls
    ;com.allow_dcom = true
    ; autoregister constants of a components typlib on com_load()
    ;com.autoregister_typelib = true
    ; register constants casesensitive
    ;com.autoregister_casesensitive = false
    ; show warnings on duplicate constat registrations
    ;com.autoregister_verbose = true
      

  4.   

    试下换成如下:
    <?php
    //把数据库与文件放在一起吧!! 
    $conn = new com("ADODB.Connection") or die("没有该组件");
    $conn->Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=netBook.mdb");
    $rs = new com("ADODB.RecordSet");
    $rs->Open("select * from data",$conn,1,1);
    echo $rs->RecordCount();
    if(! $rs->eof) {
        //  $f = $rs->Fields(0); // 这里注释掉的是另一种字段访问方式
        //  echo $f->value;
        echo $rs->Fields["Admin_Name"]->value."<br/>";
        //$rs->MoveNext();
    }
    ?>
      

  5.   

    to xuzuning(唠叨):你在吗,能不能帮我解决这个问题,重分酬谢!