|
From: Steve F. <st...@pc...> - 2003-06-05 15:10:15
|
michael-
try do() instead of execute().
steve
MICHAEL LUCHTAN wrote:
>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
>
>
>
>
>-------------------------------------------------------
>This SF.net email is sponsored by: Etnus, makers of TotalView, The best
>thread debugger on the planet. Designed with thread debugging features
>you've never dreamed of, try TotalView 6 free at www.etnus.com.
>_______________________________________________
>Gusdev-gusdev mailing list
>Gus...@li...
>https://lists.sourceforge.net/lists/listinfo/gusdev-gusdev
>
>
|