Try to Commit after insert method, then select.... see if it helps.
-Ming
-----Original Message-----
From: Bertrand, Jean-Francois [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 02, 2002 2:37 PM
To: '[EMAIL PROTECTED]'
Subject: Missing rows in select
Hi,
I need help with DBI and DBD::Sybase.
Here's a sequence of manipulations on a table:
1. Insert records through RapidSQL
2. Select with RapidSQL: the records appear
3. Select with isql on UNIX: the records appear
4. Select through a perl script using DBD::Sybase: only the records already
in the table prior to the insert appear. The records inserted in step 1 do
not appear.
Here is the code used in the perl script:
In my script:
my @set = GetFromDB($db, "select * from Fruits");
GetFromDB is defined as this:
sub GetFromDB {
my ($db, $st) = @_;
my $dbh = GetDBH($db);
return @{$dbh->selectall_arrayref($st)};
}
and GetDBH as:
sub GetDBH {
my $db = shift;
if ( !$dbh{$db} ) {
$dbh{$db} = DBI->connect( @{$connections{$db}} );
}
return $dbh{$db}
}
Why does this way to retrieve records from the DB not return the records
recently inserted?
Thank you in advance,
Jean-Fran�ois Bertrand
BOX IT Coordination
Montreal Exchange
(514) 871-4949 x272