Class::DBI and DBD::ODBC

[prev] [thread] [next] [Date index for 2004/09/29]

From: Veljko Vidovic
Subject: Class::DBI and DBD::ODBC
Date: 17:52 on 29 Sep 2004
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::Loader can generate files?
Peter Speltz 17:06 on 29 Sep 2004

Class::DBI and DBD::ODBC
Veljko Vidovic 17:52 on 29 Sep 2004

Re: Class::DBI and DBD::ODBC
Peter Speltz 20:31 on 29 Sep 2004

Re: Class::DBI and DBD::ODBC
Rhesa Rozendaal 22:24 on 29 Sep 2004

Re: Class::DBI and DBD::ODBC
Veljko Vidovic 21:41 on 30 Sep 2004

Generated at 11:35 on 01 Dec 2004 by mariachi v0.52