Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

jdbc.commit() does not push data to database - no errors

30 views
Skip to first unread message

Markus Rentsch

unread,
Apr 7, 2021, 12:55:26 PM4/7/21
to
Hi

I have an add (passiv mode) jdbc connector to postgres named conFilesPostgres.
It is called from a lookup connector to Notes with conFilesPostgres.add(newEntry).
I have coded the 'override add' hook as follows

var jdbc = conFilesPostgres.connector;
jdbc.setCommitMode("Manual");
.... doing the upload of the file
.... building the insert prepared statement pw
var temp = ps.executeUpdate();
jdbc.commit;

There are no errors. But the transaction is not commited - i.e. no file uploaded and no record is inserted in the table.
When I change the commit mode of the connector to "After every database operation" (and remove the jdbc.setCommitMode("Manual")) then the file is uploaded and a new record is created.
I don't know, why the jdbc.commit is not pushing the changes through to the postgres db.
I use the same construct in another jdbc iterator postgres connector in the 'epilog before close' hook where it just works fine.

Any ideas what i have to change to get the manual commit to work?

As always, very appreciative of your comments and all your posts here in this google group!
Markus

Eddie Hartman

unread,
Apr 8, 2021, 7:53:47 AM4/8/21
to
Could it be something a simple as forgetting the parenthesis when calling the commit() function?

jdbc.commit();

Been there, done that :)

/Eddie
0 new messages