How to create a new .MDB file with php?

前端 未结 2 1459
刺人心
刺人心 2021-01-03 09:40

In our in house system, we have csv & xls files generated for users (phpexcel) from our MySQL database, but my boss is asking if is\'s possible to create a mdb file.

2条回答
  •  被撕碎了的回忆
    2021-01-03 09:55

    To create a new empty Microsoft Access Database we can use ADOX.

    The code below creates an empty Test.mdb file in c:\

        $adox_catalog       = new COM("ADOX.Catalog");
    
        $adox_catalog->create('Provider = Microsoft.Jet.OLEDB.4.0; Data Source=c:\Test.mdb');
    
        $adodb_conection = $adox_catalog->activeconnection();
    

提交回复
热议问题