Text file to Access Database table
Posted: Tue Jan 27, 2009 5:37 am
Hey,
I have a "example.txt" file that contains the following values(The values in the .txt file are subject to change):
01, Richard, Hewston, 55,
02, Fred, smith, 34,
03, Sam, woyhem, 45,
How can i insert this data into a access database using PHP (The common separting the cells)
I connect to the database using this code:
$db_conn = new COM("ADODB.Connection");
$connstr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=". realpath("./Database1.mdb").";";
$db_conn->open($connstr);
I have a "example.txt" file that contains the following values(The values in the .txt file are subject to change):
01, Richard, Hewston, 55,
02, Fred, smith, 34,
03, Sam, woyhem, 45,
How can i insert this data into a access database using PHP (The common separting the cells)
I connect to the database using this code:
$db_conn = new COM("ADODB.Connection");
$connstr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=". realpath("./Database1.mdb").";";
$db_conn->open($connstr);