DBI version 1.16
DBD version 0.94
perl version 5.00404. I know.

Sorry about this oversight.

JF

-----Message d'origine-----
De : Bertrand, Jean-Francois [mailto:[EMAIL PROTECTED]]
Envoy� : 2 octobre, 2002 15:37
� : '[EMAIL PROTECTED]'
Objet : 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

Reply via email to