Washizu has asked for the wisdom of the Perl Monks concerning the following question:
Monks,
I'm currently developing a Perl/CGI app that uses an MS Access database. To connect to the database, I'm using the Win32::ODBC module (I'd rather use DBI, but right now I must use Win32::ODBC).
The problem:
The app breaks when I send an SQL statement to the database and it returns more than 246 records. No error message is sent out.
The Code:
my $sqlStatement = "SELECT * FROM databaseName ORDER BY ID"; # Making the database connection my $dbh = new Win32::ODBC("User") or die "Couldn't connect to database: " . DBI->errorstr; if ($dbh->Sql($sqlStatement)){ print "SQL failed!.\n"; print "Error: " . $dbh->Error() . "\n"; $dbh->Close(); exit; } my @dates = (); my %Data = (); # Loop through the recordset, put the data into our array, then do wit +h it as we please while( $dbh->FetchRow() ) { %Data = $dbh->DataHash(); push( @dates, $Data{myDateTime} ); } # Say goodbye to the database $dbh->Close();
What I have tried:
Where I think the problem could lie:
-----------------------------------
Washizu
http://www.bengarvey.com
Corrected sql per author's req. - dvergin 2002-08-31
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: MS Access and Win32::ODBC problem
by gav^ (Curate) on Aug 30, 2002 at 20:51 UTC | |
by Washizu (Scribe) on Sep 03, 2002 at 14:16 UTC | |
Re: MS Access and Win32::ODBC problem
by demerphq (Chancellor) on Aug 30, 2002 at 19:57 UTC | |
by Washizu (Scribe) on Aug 30, 2002 at 20:16 UTC | |
Re: MS Access and Win32::ODBC problem
by richardX (Pilgrim) on Sep 01, 2002 at 14:30 UTC | |
Re: MS Access and Win32::ODBC problem
by bilfurd (Hermit) on Aug 30, 2002 at 19:41 UTC | |
by Washizu (Scribe) on Aug 30, 2002 at 19:48 UTC |