PDA

View Full Version : Connect & read a paradox.


Mhtml
06-07-2003, 11:39 AM
How can I connect and read all the data from a Paradox database?

And a MS Access database?

I'm attempting to get all the fields from the Paradox database and put them into an access database as Access doesn't seem to want to open the paradox or import/link to it, which apparently happends often with paradox files.

firepages
06-08-2003, 02:52 AM
You can use the ODBC functions to get at both Paradox and MS access, you just have to set up a DataSourceName for each DB in control panel > administative tools > data sources

once you have the DSN connecting to a paradox DB is as simple as ..


<?
//user and pass if required
$conn = odbc_connect('PDX',$user,$pass);
//printout all tables in this DB//
$tables = odbc_tables($conn);
while (odbc_fetch_row($tables)) {
echo odbc_result_all($tables);
}
?>


For later versions of Paradox you should also be able to use the Interbase functions as well.