Data extraction from MSAccess into web page

Posted on 2004-11-26
Last Modified: 2008-03-17
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!
Question by:APincha
    1 Comment
    LVL 3

    Accepted 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

    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).

    Join & Write a Comment

    Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
    This isn't a frequent question on EE. I must have seen it three or four times (among several thousand questions). However, I use this trick quite often, most frequently as a delayed Current event. A form does not expose it's calculation dependenc…
    What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
    In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

    755 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

    22 Experts available now in Live!

    Get 1:1 Help Now