[freetds] 1st select fails, 2nd works

Carl Edwards edwards at vitesse.com
Wed Jul 14 17:58:01 EDT 2004


Hello,

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?

I've attached a zip file containing the freetds-pid-log.txt
and dbi-pid-log.txt for the two identical runs.

Any ideas about what might be happening would be appreciated,
or how I could restructure my DBI calls to minimize problems.

Thank You,
-Carl Edwards
                                                       

Here is a snippet of the diff of the two freetds logs:

121 ! st_next_result() -> ct_results(4043) == 1    121 ! st_next_result() -> ct_results(4040) == 1
122 ! ct_res_info() returns 1 columns              122 ! ct_res_info() returns 8 columns

123 ! ct_describe(0): type = 2, maxlen = 4         123 ! ct_describe(0): type = 1, maxlen = 50
124 ! describe() -> col 0, type 2, realtype 2      124 ! describe() -> col 0, type 1, realtype 1

130 ! 1 <- FETCH= [ 'COL(1)' ] ...                 144 ! 1 <- FETCH= [ 'FileName' 'UploadedDate' ...

132 ! dbih_setup_fbav for 1 fields => 0x45fcc0     146 ! dbih_setup_fbav for 8 fields => 0x4b6080
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freetds.zip
Type: application/x-zip-compressed
Size: 22397 bytes
Desc: freetds.zip
Url : http://lists.ibiblio.org/pipermail/freetds/attachments/20040714/9b200b9c/attachment.bin 


More information about the FreeTDS mailing list