Here is my script:
$db_handle=DBI->connect("$dbstr", "", "",
{RaiseError => 0, AutoCommit => 0, PrintError => 1})
|| die "Connect error: $DBI::errstr" ;
$result=$db_handle->selectrow_array("set isolation to dirty read");
Note: $dbstr
is a valid database name.
I am not a database programmer. What am I doing wrong which is causing the Perl script fail saying:
DBD::Informix::db selectrow_array failed: SQL: -400: Fetch attempted on unopen cursor.
If I write a simple script to connect to database $dbstr
and display the table contents it works fine but the above code does not work.