Possible to create an MDB file without Access?

Drakkon

Diamond Member
Aug 14, 2001
8,401
1
0
Are there any routines to write out a MDB file in PHP like you would say a xml file or the like? Or is it possible to create/drop tables in and mdb file without access in PHP?
 

Traire

Senior member
Feb 4, 2005
361
0
0
If your using PhP, why not use mySQL?

I assume since your programming in PhP, that your on a Linux/Unix box. If its your web host, they probably have mysql already installed. If its your own server, then go here:

http://dev.mysql.com/downloads/
 

Drakkon

Diamond Member
Aug 14, 2001
8,401
1
0
i'm using PHP as a back end data entry system...a real DB is already in place. One data has all been entered in i need a way to put that data into a transportable database on a cd that will be used along with a simple VB program. mdb is the only password protected file db format i know of that can be put on to a CD.
 

Traire

Senior member
Feb 4, 2005
361
0
0
What kind of computer will you be running on? If its a windows machine with IIS, then ASP would be a much better choice, both for the platform and for hooking into an mdb file.

If you know php will work on your system, then you would need something like:

$db = 'path to your database';

$conn = new COM('ADODB.Connection');

// Two ways to connect. Choose one.
$conn->Open("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=$db");
//$conn->Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=$db");

That will connect you to the DB file. You can then use sql statements to query the table you want, make new tables, and write data to the tables. The above will only work if your running on a windows platform. If your not running on windows, im not sure how to make the connection.

 

Drakkon

Diamond Member
Aug 14, 2001
8,401
1
0
yeah i've gotten that to work for pre-exisiting mdb files but can't find a way to create MDB files...at least not in php.
so i did it in ASP (I am on a windows platform so it works out well)...i guess just swap between languages until figure something better out :)