0

I developed a PHP web app which interacts with MS SQL 2005 database. User will access my web and get some data they need in Excel format. I've done this with phpexcel extension.

However, now I need to save the query result in MS Access format (.accdb/.mdb) due to Ms Excel restriction for large file.

I could not find any Ms Access writer or any similiar things in the internet.

Any help would be appreciated. Thanks

Fionnuala
  • 90,370
  • 7
  • 114
  • 152
  • Try this; [http://stackoverflow.com/questions/1388971/how-i-create-access-database-at-runtime-in-c][1] [1]: http://stackoverflow.com/questions/1388971/how-i-create-access-database-at-runtime-in-c – ChrisBint Jul 25 '12 at 04:27
  • Thanks ! I am wondering how to write each line of data since the tutorial only explained about how to create new Access file and new table. – Daniel Ginting Jul 25 '12 at 04:37
  • What is the Excel filesize limit you're hitting? Older versions of Excel were indeed quite limited, but recent versions have much much higher limits -- and if you're shifting *that* much data, I'm not sure that an MS Access file would be appropriate either. – Spudley Jul 25 '12 at 06:21
  • Excel 2007 has indeed great improvement in row capacity. What does matter is the result can be more than one million rows. My user found it is more comfortable to deal with such large data with Ms. Access. – Daniel Ginting Jul 25 '12 at 14:20

1 Answers1

0

You could use PHP-ODBC or PHP's PDO-ODBC either of these will access a system ODBC data source that you could point to your Access database. These is a good guide to this on W3Schools.com.

Richard Spencer
  • 623
  • 7
  • 14
  • Thanks! This is what I'm looking for. But still got one more problem. I couldn't use more than one Ms. Access DB file since it has to be configured in Control Panel. I doubt it can run perfectly when multiple user use this feature at the same time. Can I use several Ms. Access DB files independently? – Daniel Ginting Jul 25 '12 at 14:25
  • If you use a DSN-Less connection from PHP you could specify the data at runtime. It would look something like Driver={Microsoft Access Driver (*.mdb)};DBW=c:\path_to\database.mdb - you could also add any optional connection parameters at that point. – Richard Spencer Jul 26 '12 at 07:31