[freetds] Odd statement execution problem
WillS at housing.ufl.edu
Tue Jun 24 11:34:42 EDT 2003
> -----Original Message-----
> From: Michael Peppler [mailto:mpeppler at bluewin.ch]
> Sent: Tuesday, June 24, 2003 10:35 AM
> To: FreeTDS Development Group
> Subject: Re: [freetds] Odd statement execution problem
> This means that $dbh isn't defined - i.e. you don't actually have an
> open connection at this point.
> BTW - don't change "my $sql = ..." to "local $sql = ..." - I very much
> doubt that you need the "local" semantics here.
The 'local' context was needed for the $dbh connection handle, that was the problem. The error was cropping up in a subroutine, whereas the database connection was made in 'my' context outside the subroutine in question. It was a perl thing, nothing freetds related at all, fortunately.
I just wonder why the script ever worked at all. I had recently modified it to fork() for groups of input data to try and have it complete more quickly, and that's the first I had noticed it.
More information about the FreeTDS