Class::DBI::MSAccess - Extensions to Class::DBI for MS Access
This documentation refers to Class::DBI::MSAccess version 0.01
package Film; use base 'Class::DBI::MSAccess'; Film->connection('dbi:odbc:dbname', 'user', 'password'); Film->table("film"); ...
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).
SELECT @@IDENTITY
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.
INSERT INTO
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.
Class::DBI
Microsoft Access 2000 or newer
None known
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.
bug-class-dbi-msaccess at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Class::DBI::MSAccess
You can also look for information at:
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Class-DBI-MSAccess
CPAN Ratings
http://cpanratings.perl.org/d/Class-DBI-MSAccess
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Class-DBI-MSAccess
Search CPAN
http://search.cpan.org/dist/Class-DBI-MSAccess
Ricardo Signes for writing Class::DBI::MSSQL
Michael Hendricks <michael@palmcluster.org>
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.
To install Class::DBI::MSAccess, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Class::DBI::MSAccess
CPAN shell
perl -MCPAN -e shell install Class::DBI::MSAccess
For more information on module installation, please visit the detailed CPAN module installation guide.