OK, here it goes.
Database c:\temp\mydatabase.mdb
Total rows: 20
Table description: items_tbl two fields (item_number = number,
description = memo)
item_number description
-------------------
----------------------------------------------------------------------------
---------------------
1 Apples
2 Oranges
3 Pears
....
20 Strawberries
I can insert and select data from this table using Perl no problem. But, if
I do an update to the memo field on any of the records in the table the next
time I attempt to select from that record the query fails. It does not
return any errors just no data at all and the row count is -1. Now if I
take the same exact query and execute it in Microsoft Access the query
works as expected. I am at a loss here. I have attempted to troubleshot
this by catching and displaying errors but no luck.
#-------------------------------------------Actual code snippet starts here
-------------------------------------------
my $connectString =
'DBI:ODBC:driver=Microsoft Access Driver
(*.mdb);dbq=c:/temp/mydatabase.mdb'; my $dbh = DBI->connect($connectString,
$login, $password);
my $sqlCmd = 'SELECT Description from items_tbl where item_number = 5';
my $rh;
eval{
$rh = $dbh->prepare($sqlCmd);
$rh->trace(2);
$rh->execute();
};
print "SQLCMD: $sqlCmd<br>Error: $@<br>Rows: " . $rh->rows; exit;
#----------------------------------------------- End code
-------------------------------------------------------
The output from the above page after an update is:
SQLCMD: 'SELECT Description from items_tbl where item_number = 5 Error:
Rows: -1
Thank you for your help in advanced.
CW2 Daniel Maldonado
Programmer Analyst USPFO-CT
860.524.4931 DSN: 636-7931