开发者

Read binary data from a MDB-file running under LAMP

开发者 https://www.devze.com 2023-01-02 04:00 出处:网络
I need to be able to connect to an MDB-file in a LAMP-environment (running on Linux) and ultimately insert converted data into a Mysql db.

I need to be able to connect to an MDB-file in a LAMP-environment (running on Linux) and ultimately insert converted data into a Mysql db.

  • The data I need to access is stored as a BLOB (Long Binary Data according to Access) in the MDB file. I have not yet been able to actually have a look at the data but I have been told that the BLOB consists of byte strings. Something along the lines of:

    0x1c 0x10 0x27 0x00 0x00

  • I need to parse the byte strings and convert these to a format that is

    human readable. I do have access to

    the documentation that explains the

    various byte strings.

So this is really two questions:

  1. How do a get access to the MDB file via PHP* (running u开发者_运维技巧nder LAMP) and read the BLOB (I do not have access to a Windows-platform)?
  2. What would be the best way to parse the binary data (in PHP*) once I am able to connect to the MDB-file?

*Or are there other methods/languages that are more appropriate?


There is a PECL library that connects to a Linux based MDB parsing tool.

Reading Access Databases with PHP and PECL

In this article, I'll introduce you to PHP's MDBTools extension, which provides an API to programmatically read data from Microsoft Access database files. If your project involves working with such files, extracting database records either for calculations or for conversion to other formats, you'll find this extension invaluable. Come on in, and see how it works!

You will probably need administrator access on the server to install the necessary libraries.

If you can use a Windows server, you should be able to connect to the file directly using ODBC using ADODb or through the windows COM as shown in this blog entry.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号