Re: [Dbi-interbase-devel] Re: commit not committing
Status: Beta
Brought to you by:
edpratomo
From: Ritz D. <dan...@gm...> - 2001-10-18 15:41:57
|
it works ok for me... test environments: - windows 2000, perl 5.6.1, dbd-interbase 0.28.4, ib 601, - conectiva linux 6.0 (kernel 2.2.19/ix86), perl 5.6.0, ib 60 ss, dbd-interbase 0.28.4 i tested with a local database and with a remote database...no problems what about your gcc on redhat 7.1? it is 2.96 right? 2.96 is known to have problems. the latest official stable 2.9x release is 2.95.3.....2.96 was _never_ released as 'stable' (one of the reasons why i don't use RH...). may be that's the problem why the dbd is not working right... another question: RH on x86 or on alpha or IA64? -daniel ----- Original Message ----- From: "Adam Clarke" <Ada...@St...> To: <dbi...@li...> Sent: Thursday, October 18, 2001 3:00 AM Subject: [Dbi-interbase-devel] Re: commit not committing > I guess this could be a bug. Have you tried doing a seperate prepare and > then execute? > > i.e. > > my $sth = $dbh->prepare('UPDATE user_info SET unavailable=?') or die > $dbh->errstr; > $dbh->execute($state) or die $sth->errstr; > > P.S. (Gratuitous advice :) > > Note the use of the placeholder ?. Use this instead of string interpolation > for safety, security and sanity of your code. A 'do' would look like this > ... > > $dbh->do('UPDATE user_info SET unavailable=?', undef, $state) or die > $dbh->errstr; > > ----- Original Message ----- > > Date: Wed, 17 Oct 2001 11:14:11 -0700 > > From: Brad Greenlee <br...@fo...> > > > Sorry to bug you all, but I'm at my wit's end. For some reason, I can't > get anything to commit. I'm trying to do an UPDATE to a table, and I've > tried every combination of AutoCommit on/off, using the commit statement, > using prepare vs. do, etc. The test program below executes just fine, but > when I check the table, it isn't updated. If I then type in 'commit' via > isql, the update shows up. If I run the script again without having typed > commit manually, it deadlocks. > > > > I've got Interbase SS 6.0.1 running on Linux (RH 7.1), with Perl 5.6.1, > and DBD::Interbase 0.28.4. > > > --------------- BEGIN db_test.pl ---------------- > > #!/usr/local/bin/perl > > > > use DBI; > > > > my $state = $ARGV[0]; > > > > # connect to database > > my $dbh = > DBI->connect("dbi:InterBase:database=/opt/interbase/data/portal.gdb;host=sv- > toby",'sysdba','masterkey',{AutoCommit => 1}) or die $dbh->errstr; > > > > # make all users available > > $dbh->do("UPDATE user_info SET unavailable=$state") or die $dbh->errstr; > > > > # disconnect from database > > $dbh->disconnect; > > --------------- END db_test.pl ---------------- > > > > _______________________________________________ > Dbi-interbase-devel mailing list > Dbi...@li... > https://lists.sourceforge.net/lists/listinfo/dbi-interbase-devel > |