Re: DBI + DBD::ODBC + unixODBC + FreeTDS + SQL Server error
- From: eric@xxxxxxxx
- Date: 27 May 2005 14:06:28 -0700
I found out some more information but I still need some advice. The
problem I am getting is occuring because occasionally "finish" is not
called on a statement handle before another SQL statement is called on
the same database handler. Here is a typical situtation of my problem:
my $stmt = $dbh->prepare( $sql );
$stmt->execute();
while( my $row = $stmt->fetchrow_hashref() ) {
....call some functions...
}
Now in the center of this loop I call various functions based on the
data retrieved on some of these function can possibly also make SQL
requests on the same database handler (although they create their own
statement handlers). When they make their calls I get my error
messages. So what I have to do is have two loops. One is where I loop
through the rows and retrieve the data. The other is where I loop
through the array of data that was retrieved and carry out the actions
necessary. But this is obviously a pain and there seems that there must
be some better way to do this. I am guessing that I simply have some
funky option or paremeter wrong which is causing me to only be able to
execute one SQL query at a time per database handle. What is the best
way around this?
Eric
.
- References:
- Prev by Date: Re: records returned by DBI::selectall_hashref() are not ordered
- Next by Date: Re: SQL -25507 error trying to build DBD::Informix on linux
- Previous by thread: DBI + DBD::ODBC + unixODBC + FreeTDS + SQL Server error
- Next by thread: Compiling Multiple versions of DBD::Oracle
- Index(es):
Relevant Pages
|