• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 205
  • Last Modified:

Data extraction from MSAccess into web page

i need the procedure to extract data out of an mdb file into javascript or perl. I"ve got it working extracting out of sybase but i don't know how to do this using access. Help!
1 Solution
If you're using Perl, you can use DBI or the win32::ODBC module directly.

Create a system datasource for your database using the ODBC settings in the Windows control panel. Let's say it's called nameofyourdatabase

In your Perl script write:

use DBI;

my $db = DBI->connect('DBI:ODBC:nameofyourdatabase', 'user', 'password');
my $query = 'SELECT * FROM whateveryourtableis';
my $prepquery = $db->prepare( $query );

# define variables to write fetch results to
my( $var1, $var2, $var3 );
$prepquery->bind_columns( \$var1, \$var2, \$var3 );

# print out results or do whatever you want with the data
while( $prepquery->fetch() ) {
  print "$var1, $var2, $var3\n";


Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now