New SQLite kicks ass - remove some warning silencers and reinstantiate tests
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Storage / DBI / ODBC / ACCESS.pm
index 1f0bfd9..96ff543 100644 (file)
@@ -2,8 +2,7 @@ package DBIx::Class::Storage::DBI::ODBC::ACCESS;
 use strict;\r
 use warnings;\r
 \r
-use Data::Dump qw( dump );\r
-\r
+use DBI;\r
 use base qw/DBIx::Class::Storage::DBI/;\r
 \r
 my $ERR_MSG_START = __PACKAGE__ . ' failed: ';\r
@@ -37,13 +36,23 @@ sub last_insert_id {
     return @{ $self->{ last_pk }->{ $result_source->name() } };\r
 }\r
 \r
+sub bind_attribute_by_data_type {\r
+    my $self = shift;\r
+    \r
+    my ( $data_type ) = @_;\r
+    \r
+    return { TYPE => $data_type } if $data_type == DBI::SQL_LONGVARCHAR;\r
+    \r
+    return;\r
+}\r
+\r
 sub sqlt_type { 'ACCESS' }\r
 \r
 1;\r
 \r
 =head1 NAME\r
 \r
-DBIx::Class::Storage::ODBC::ACCESS - Support specific to MS Access over ODBC\r
+DBIx::Class::Storage::DBI::ODBC::ACCESS - Support specific to MS Access over ODBC\r
 \r
 =head1 WARNING\r
 \r
@@ -54,8 +63,7 @@ This module is currently considered alpha software and can change without notice
 \r
 =head1 DESCRIPTION\r
 \r
-This class implements support specific to Microsoft Access over ODBC. It currently only\r
-implements functions necessary for working with auto-incremented primary keys.\r
+This class implements support specific to Microsoft Access over ODBC.\r
 \r
 It is loaded automatically by by DBIx::Class::Storage::DBI::ODBC when it\r
 detects a MS Access back-end.\r
@@ -74,8 +82,25 @@ MS Access supports the @@IDENTITY function for retriving the id of the latest in
 id for different tables, the insert() function stores the inserted id on a per table basis.\r
 last_insert_id() then just returns the stored value.\r
 \r
+=head1 KNOWN ACCESS PROBLEMS\r
+\r
+=over\r
+\r
+=item Invalid precision value\r
+\r
+This error message is received when trying to store more than 255 characters in a MEMO field.\r
+The problem is (to my knowledge) an error in the MS Access ODBC driver. The problem is fixed\r
+by setting the C<data_type> of the column to C<SQL_LONGVARCHAR> in C<add_columns>. \r
+C<SQL_LONGVARCHAR> is a constant in the C<DBI> module.\r
+\r
+=back\r
+\r
 =head1 IMPLEMENTED FUNCTIONS\r
 \r
+=head2 bind_attribute_by_data_type\r
+\r
+This function currently supports the SQL_LONGVARCHAR column type.\r
+\r
 =head2 insert\r
 \r
 =head2 last_insert_id\r
@@ -98,7 +123,5 @@ Det Norske Veritas AS (DNV)
 \r
 http://www.dnv.com\r
 \r
-\r
-\r
 =cut\r
 \r