That $dbh is for a separate database for storing feedback "forms" sent out to people that have used our help desk. Any changes to the RT database, I am doing through the RT interface. my $sth = $dbh->prepare("SELECT * FROM new_survey(?,?,?)"); actually inserts into the feedback database, and returns the id of the inserted row, updating a few other tables in that database, as necessary.
I will take a closer look at AddCustomFieldValue, though. > -----Original Message----- > From: Stephen Turner [mailto:[EMAIL PROTECTED] > Sent: Monday, December 11, 2006 10:04 > To: Jacob Helwig; rt-users@lists.bestpractical.com > Subject: RE: [rt-users] Adding custom field values from Perl script. > > Jacob, > > I can't see anything obviously wrong with the AddCustomFieldValue > statement > - I'd recommend using the Perl debugger to step into the > AddCustomFieldValue > method (in Record.pm) and see what it does. > > I'm wondering about the use of the transaction control on the $dbh > handle > though. The only database updates in the script are done through the RT > API > using a separate database handle ($RT::Handle) - so the rollbacks, > commits, > etc that you do on $dbh have no effect on these updates. The RT API has > methods to control transactions, so it might be better to use those. > > Steve > _______________________________________________ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: [EMAIL PROTECTED] Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com