Class::DBI and DBD::ODBC
[prev]
[thread]
[next]
[Date index for 2004/09/29]
Hi, all
I am trying to transfer mdb (access) data to oracle.
So, I was thinking of using DBD::ODBC and DBD::Oracle
together with CDBI.
Problem is that table names in mdb are space separated, eg. "THIS IS TABLE
NAME",
so I am getting:
DBD::ODBC::db prepare_cached failed: [Microsoft][ODBC Microsoft Access
Driver]
Syntax error in FROM clause. (SQL-42000)(DBD: st_prepare/SQLPrepare err=-1)
[for Statement "SELECT ata FROM ATA CODES AND DESCRIPTIONS"] at
C:/Perl/site/lib/Ima/DBI.pm line 391.
Thanks in advance,
Veljko
package ReoMDB::ReoDB;
use strict;
use warnings;
use base 'Class::DBI';
my ($dsn, $username, $password) = getConfig();
ReoMDB::ReoDB->set_db('Main',
$dsn,
$username,
$password,
{ AutoCommit=>1 },
);
sub getConfig {
return ('dbi:ODBC:REO_Back_End','', '');
}
1;
package ReoMDB::Ata;
use strict;
use base 'ReoMDB::ReoDB';
__PACKAGE__->table('ATA CODES AND DESCRIPTIONS', 'ATA CODES AND
DESCRIPTIONS');
__PACKAGE__->columns(All => ('ATA', 'ATA DESC'));
1;
use strict;
use ReoMDB::ReoDB;
use ReoMDB::Ata;
my @objs = ReoMDB::Ata->retrieve_all;
|
|
Class::DBI and DBD::ODBC
Veljko Vidovic 17:52 on 29 Sep 2004
|