The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Class::DBI::MSAccess - Extensions to Class::DBI for MS Access

VERSION

This documentation refers to Class::DBI::MSAccess version 0.01

SYNOPSIS

    package Film;
    use base 'Class::DBI::MSAccess';
    Film->connection('dbi:odbc:dbname', 'user', 'password');
    Film->table("film");
    ...

DESCRIPTION

This is a simple subclass of Class::DBI which makes Class::DBI work correctly with Microsoft Access databases. I've only tested this module when connecting to the database with DBD::ODBC. This module requires Microsoft Access 2000 or newer (so that SELECT @@IDENTITY is available).

The changes to Class::DBI are as follows:

  • Use SELECT @@IDENTITY to get the value of the AutoNumber primary key column after inserting a new row.

  • If no value is provided for the primary key column when creating a new row, this module removes the primary key column's name from the INSERT INTO SQL and tweaks the list of placeholders appropriately. This causes Access to autogenerate the new primary key value.

CONFIGURATION AND ENVIRONMENT

If you connect to the Access database with ODBC, you'll need to establish the correct ODBC settings. Other than that, Class::DBI::MSAccess uses no configuration files or environment variables.

DEPENDENCIES

  • Class::DBI

  • Microsoft Access 2000 or newer

INCOMPATIBILITIES

None known

BUGS AND LIMITATIONS

I've only tried this module with DBD::ODBC as the connection method. If it does or doesn't work with other connection methods, please let me know.

Please report any bugs or feature requests to bug-class-dbi-msaccess at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Class-DBI-MSAccess. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Class::DBI::MSAccess

You can also look for information at:

ACKNOWLEDGEMENTS

Ricardo Signes for writing Class::DBI::MSSQL

AUTHOR

Michael Hendricks <michael@palmcluster.org>

LICENSE AND COPYRIGHT

Copyright (c) 2005 Michael Hendricks (<michael@palmcluster.org>). All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.