Help with accessing mdb file: Linux server


#1

I have data stored on our web server running LAMP in a MySQL database. We need to be able to read information from that database (easy) and insert the data into an access .mdb file that can be mailed out to individuals “on demand”.

The plan is to have a skeleton mdb file on our server, to have php make a copy of it, add records, send via email, and then delete the copy when complete.

Unfortunately, the inserting records is proving to be a problem because I don’t think I’m understanding what needs to be done to write/connect to the .mdb file. I’ve found lots of code available, but I think it’s all based on either a) being done on a windows server instead lf Linux/Unix or b) using an Access database instead of a .mdb file (or is that the same thing).

Any direction or clarification would be appreciated!


#2

Well, first, .MDB are Microsoft Access Database format. It is not designed to be used online.
It is a locally based system. Mainly for uses such as VB programs or MS Access.

I did find a link that talked about being able to access the .mdb files. Not sure if it will help…
http://forums.asp.net/t/1607438.aspx/1?Solution+in+Using+MS+Access+mdb+on+Godaddy+web+config+

You could use a VB program that reads the online database and creates the MDB locally and emails it.

Good luck…


#3

Thanks for the advice, but it’s not quite what we’re looking for. Just a bit more background:

We have a program that individual clubs within our organization use that has been given to us to use by our parent organization.

We maintain data for events in our online, MySQL database, but need to export specific items for others to import. The software will only import data from an mdb file. Since many of the people that need to use the software are relatively computer illiterate, the goal is to make the process as simple as possible.

When they visit our website, they should be able to just click on a button, and the data needs to be exported into an mdb file and mailed out to them “on demand”. The site is a typical LAMP installation.


#4

Well, first, LAMP is just a term for Linux with Apache with MySQL… Nothing more…

So, what you are saying is that you are using an Apache server with MySQL.
Most PHP sites use this or something similar. All normal…

But, MySQL is similar to a MS-SQL system. Only more generic. You are still talking about a SQL system.
.MDB files are MS-DB format. This is used for one thing. LOCAL databases in VB, VS, VC and Access formats… NOT SQL!!! It can NOT be done easily from SQL…

Not that I have ranted that out… There is a way or two that might work, but, a lot of crazy work to do so! You can have the server automatically run a VB app or Access app or VC app or other local application that would open both the SQL database AND the .MDB database. Then, that local-app could combine the data for you and copy the file to a second file that could be emailed or posted as a link for the user to download. This would require one of the above languages to write the local-app that the server could call to move the needed data form SQL to MDB. So, do you have someone on your team that can write a VB or VC or Access app? If so, what they would have to do is create a program that could be called directly (meaning a .exe file) and read the SQL database for instructions on how to get the data needed and create the new MDB file. This can be done. But, lots of work. The other way would be have the users just use the online system with access to the SQL database or create a program for them to access the SQL database directly. Well, I will be here on this site a lot the next two days , so ask away any more questions you need answers to. I hope I can come up with an easy solution for this tricky project… Good luck…

PS: Oh, there is NO “typical” LAMP or any other installation… They are ALL tricky… LOL


#5

Drat. I was hoping for a simple solution, something that could be solved simply with PHP :frowning:

I guess we’ll have to stick with creating a comma delimited file with our data and have someone manually create the mdb by importing it and then emailing the mdb to the individuals requesting it.

Thanks for answering my questions.

Cheers!


#6

Wait… So, you are talking about “someone importing it”… This means that you have someone on staff that would take a CVS file (comma delimited file) and manually creating the MDB… What I was saying is that you can create a program to do this for you. BUT, it can not be done with PHP. It would have to be locally on some local computer. So, YOUR computer could do it. Just have to run the program on a regular schedule. (This can be automated!) You just need to create a VB (Visual Basic) or VC (Visual C++) or even a MS-Access program that would read the online database and then move the needed data into a “local” MDB database. Once that is done, it can email the DB to who ever or even uploaded to the online website.

ALL IS POSSIBLE… Just have to sort it out… Is the “someone importing it” you or someone else? Is their computer online 24/7? How often do you need to create this MDB??? It can be done… Just not the way you are thinking…