[jifty-devel] Database Help

Scott T. Hildreth shildret at scotth.emsphone.com
Thu Sep 28 19:17:46 EDT 2006


I was testing the Jifty::DBI examples,

############################################################

use strict;
use warnings;

use Jifty::DBI::Handle;
use TestTable;

$ENV{DBI_AUTOPROXY} = 'hostname=myhost.example.com;port=3333';

my $handle = Jifty::DBI::Handle->new();

$handle->connect(
    driver   => 'Oracle',
    sid      => 'mysid',
    host     => 'mhost.example.com',
    user     => 'usr',
    password => 'passwd'
);

my $t = TestTable->new( handle => $handle );

$t->load_by_cols(qnum=>5);

print "CCode     : ", $t->ccode(),  "\n";
print "Qnum      : ", $t->qnum(),   "\n";
print "QDate     : ", $t->qdate(),  "\n";

#############################################################

when the the load_by_cols executes I get the Oracle error,

   ORA-00942: table or view does not exist

couldn't execute the query 'SELECT  * FROM testtables WHERE qnum = ?'

                                                    /\
                                                    ||
                                            An 's' is added to the 
                                            table name.

I don't think the table attribute is set in Jifty::DBI::Handle::Oracle,
where is it set?

                      Thanks.



On Wed, 2006-09-27 at 14:59 -0500, Scott T. Hildreth wrote:
> I know I am probably missing this in the docs, but I can't find it or
> misunderstand them.  I have an existing database (Oracle) and I would
> like to setup a look up page, using Jifty.  Basically I am following 
> the Tutorial to get me started.  What I am not sure of is how do I map
> the current table?  Do I add the columns to the Model pm and then do a
> jifty schema --setup?  Will Jifty create the object mappings for the
> columns and not try to create the table?  Am I way off here?  This would
> be a nice tutorial to add to the docs.  I would be willing to create it
> once I figure out what I am doing.  Sorry if this obvious, this is my
> first attempt to use a web-framework.  My web experience is basically
> been with some basic CGI codding.  
> 
>                         Thanks.
> 
-- 
Scott T. Hildreth <shildret at scotth.emsphone.com>


More information about the jifty-devel mailing list