1

I built a stock manager on VB.NET, it uses a MS Access Database. I also built a website, and on this website I want to relularly upload the updated MS Access database file onto the website and insert it into the mySql Database. Now my problem is I dont know how to access the MS Access file using php, im sure theres a way without buying those softwares, but i cant find it. Now I not bound to this scenario, if someone has better ideas i would appreciate it, most importantly I want the stock management to be offline, and at the end of the day, i want it uploaded to the site. Thanks alot

1
  • I would probably consider writing an updater in VB.Net that simply takes the Access data and dumps it into a MySQL database right from the desktop instead of uploading the Access database. Commented May 20, 2011 at 12:33

2 Answers 2

2

I have done that in the past using ADODB and JET:

// connect
$conn = new COM('ADODB.Connection');
$conn->Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source={$database};Mode=ReadWrite;");

//query
$results = $conn->Execute($sql);

// retrieve
$results->Fields[$field]->Value;

// navigation
$results->MoveNext();
$results->Move($count);
$results->EOF();

// Close (don't forget)
$conn->Close();

This is just a small sample. More Help

Sign up to request clarification or add additional context in comments.

Comments

0

Look into php_odbc which has the ability to communicate with MS Access if you have correctly configured an ODBC data source on the PHP server. php_odbc documentation here.

// From the `odbc_connect()` documentation:
// Microsoft Access
$connection = odbc_connect("Driver={Microsoft Access Driver (*.mdb)};Dbq=$mdbFilename", $user, $password);

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.