From: MICHAEL L. <lu...@cs...> - 2003-06-05 14:16:35
|
Hello all- In keeping with the spirit of only interacting with the gus database through perl modules (and in attempting to automate a repetitive task), I was trying to insert some things in the database by writing a plugin. I use the gusconfig file to log into the data base like so: my $gusconfig= GUS::Common::GusConfig->new("$ARGV[1]"); my $db= GUS::ObjRelP::DbiDatabase->new($gusconfig->getDbiDsn(), $gusconfig->getDatabaseLogin(), $gusconfig->getDatabasePassword, 1,0,1, $gusconfig->getCoreSchemaName); And can read the database easily by commands like: $dbh= $db->getQueryHandle(); $stmt= $dbh->prepare("select MAX(external_database_id) from sres.externaldatabase"); $stmt->execute(); But when I attempt to insert things in the database using the same paradigm, nothing gets inserted. Foor example, the following code segment does NOT result in anything being inserted into the database: $dbh= $db->getQueryHandle(); $stmt= $dbh->prepare("insert into sres.externaldatabase values($maxID, '$ucAbb', '$lcAbb', SYSDATE,1,1,1,1,1,0,6,3,2,1)"); $stmt->execute(); But if I do the equivalent thing at an sql*plus prompt, using the same login information as was gotten from the gusconfiguration file, I am allowed to do an insertion. Am I missing a commit option somewhere? Any helo would be appreciated. Michael Luchtan http://www.cs.uga.edu/~luchtan |