[freetds] 1st select fails, 2nd works
James K. Lowden
jklowden at schemamania.org
Wed Jul 14 22:40:34 EDT 2004
On Wed, 14 Jul 2004 <edwards at vitesse.com> wrote:
> I'm running 0.62.4 with DBI 1.42 against a MSSQL server (8.0.x).
> Can anyone explain why running the same SELECT statement returns
> different results the second time?
> The first run of the perl script shows only 1 element is returned
> but when the same SQL is rerun I get the expected 8 columns?
Meet the new FAQ. :-)
You're almost certainly seeing spurious CS_STATUS_RESULT result types.
Try perldoc DBD::Sybase, looking for syb_result_type.
We might have fixed this in current CVS, that is, we might be correctly
suppressing the spurious results. The fix hasn't been widely tested yet,
though, and slightly broke row buffering in db-lib.
More information about the FreeTDS