Solved

Access to MDB file using Perl on Linux

Posted on 2004-08-30
12
1,159 Views
Last Modified: 2012-06-27
Hi,

I have a redhat linux server with DBI installed. I need to be able to access and manipulate MDB files directly on the server. I think I just need a Microsoft Access Drvier for DBI, any thoughts on that?! I am desperate.

Thanks!
0
Comment
Question by:vipsem
  • 5
  • 5
12 Comments
 
LVL 5

Expert Comment

by:jpfx
Comment Utility
no good news I'm afraid. Because you are on linux you can't get to the data in an mdb that easily. Normally you'd make a connection by creating a system DSN on the PC that hosts the mdb but this can only be seen by other windows PCs.

You'll need a proxy of some sort. Have a look at the dbi proxy stuff for a start:

http://search.cpan.org/~timb/DBI-1.35/lib/DBD/Proxy.pm
http://search.cpan.org/~timb/DBI/lib/DBI/ProxyServer.pm

I haven't tried them yet myself but I am currently working on this for my own work. Other stuff which might be worth googling for are dbtcp, mdbtools and ODBCsocketserver.
0
 

Author Comment

by:vipsem
Comment Utility
Thanks! But I can't see how a proxy on the same machine would help me out!
0
 
LVL 5

Expert Comment

by:jpfx
Comment Utility
It provides a proxy connection that linux CAN access.
0
 

Author Comment

by:vipsem
Comment Utility
But to a different machine that can access MDB's right?!
I mean if a proxy could access the MDB file on linux, then my problem is solved! but these ones do not look like they are able to do that.
0
 
LVL 5

Expert Comment

by:jpfx
Comment Utility
I've re-read your question and I need to clear up that you cannot have the mdb on the linux machine and manipulate it. It must reside on a windows machine and must be accessed from there.

If the database tables aren't complicated then I'd consider using something like sqlyog to import the data into a mysql database that can reside on your linux server.

Did you look at the other 2 options?
Also I have another one for you:

http://www.databasejournal.com/features/php/article.php/2222651

which was part of a thread here:

http://www.experts-exchange.com/Web/Web_Languages/PHP/PHP_Databases/Q_20973403.html
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

Author Comment

by:vipsem
Comment Utility
Well,

The fact that I can not have an MDB file on linux and manipulate it on Linux, does not seem to be the case, since I have found many sources with portions of information on that. It is just that I can not find a fully explained answer. Are there any DBI drivers for MDB access?! just like the "microsoft access driver" DBI driver on Activestate Perl?

Thanks.
0
 
LVL 5

Expert Comment

by:jpfx
Comment Utility
dbi uses odbc to connect to an access mdb normally. You could try a 'dsn-less' connection and see where that gets you:

http://dev.isystek.com/dbi/fom-serve/cache/7.html

Apart from that, I can't really help you, sorry.
0
 

Author Comment

by:vipsem
Comment Utility
Thanks! but that is only applicable in two cases:

1. On Linux with the MS Access Driver for DBI. which is what I am looking for.

2. On Windows with ActiveState Perl. Which is not the case with me.
0
 
LVL 5

Accepted Solution

by:
jpfx earned 500 total points
Comment Utility
I am not aware of any DBI driver that connects directly to an mdb for linux. The only references I've read about regarding manipulating mdb on a linux machine refer to problems with the lockfile being created with the correct permissions if the mdb is hosted by a linux machine.
I have to ask why you would want to maintain an mdb on a linux machine if there aren't any windows machines that connect to it? why not change your db to a linux friendly format?
0
 

Author Comment

by:vipsem
Comment Utility
Well,

The reason is that the whole office use windows to work on the Database. However, we need to have the clients be able to access the updated database every week. I will be uploading the mdb every week to the linux server where our websites are being hosted.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now