Skip to Content.
Sympa Menu

freetds - Re: [freetds] empty results on multiple step query

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT schemamania.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] empty results on multiple step query
  • Date: Sat, 3 Jul 2004 10:19:41 -0400

On Sat, 3 Jul 2004 <adrian AT techonline.com> wrote:
> Hi Guys,
>
> David Barnwell posted a very similar problem to the one I am
> experiencing on Fri Jun 25 15:07:35 EDT 2004:
>
> https://lists.ibiblio.org/sympa/arc/freetds/2004q2/016465.html
...
> ----------------------------------------------
> set rowcount 0
> select distinct
> c.content_id as content_id,
> c.content_title as content_title
> into #temptable
> from MYDB.dbo.content c
> where c.content_type_name = 'mycontenttype'
> select t.content_id,
> t.content_title,
> c.content_summary,
> c.broadcast_date,
> c.broadcast_length,
> c.content_author_company
> from TOL.dbo.content c, #temptable
> where c.content_id = t.content_id
> order by c.broadcast_date desc
> drop table #temptable
> set rowcount 0
> ----------------------------------------------
>
> If I run this query against my SQL Server 7.0 server, using the new
> configuration (i.e. freetds-0.62.4), it works fine. In fact, if I run
> the query by tsql and run it against my SQL Server 2000 server, it runs
> fine. For some reason, it returns "0" when I try fetching the results in
> PERL against SQL Server 2000.

The answer may be that you need to check $sth->{syb_result_type}, because
the new server is returning spurious result status codes. Cf. perldoc
DBD::Sybase.

Your logs do have different counts for these things, see below. The 4043
is a (perhaps unexpected) CS_STATUS_RESULT.

HTH.

--jkl

$ grep ct_results S*.log |grep \(type |cut -b-24,85-

SQLServer2K(tds70).log:2 (type 4052)
SQLServer2K(tds70).log:2 (type 4052)
SQLServer2K(tds70).log:2 (type 4049)
SQLServer2K(tds70).log:2 (type 4040)
SQLServer2K(tds70).log:2 (type 4052)
SQLServer2K(tds70).log:2 (type 4052)
SQLServer2K(tds70).log:2 (type 4052)
SQLServer2K(tds70).log:2 (type 4052)
SQLServer2K(tds70).log:2 (type 4052)
SQLServer2K(tds70).log:2 (type 4052)
SQLServer2K(tds70).log:2 (type 4043)
SQLServer2K(tds70).log:2 (type 4049)
SQLServer2K(tds70).log:2 (type 4040)
SQLServer2K(tds80).log:2 (type 4052)
SQLServer2K(tds80).log:2 (type 4052)
SQLServer2K(tds80).log:2 (type 4049)
SQLServer2K(tds80).log:2 (type 4040)
SQLServer2K(tds80).log:2 (type 4052)
SQLServer2K(tds80).log:2 (type 4052)
SQLServer2K(tds80).log:2 (type 4052)
SQLServer2K(tds80).log:2 (type 4052)
SQLServer2K(tds80).log:2 (type 4052)
SQLServer2K(tds80).log:2 (type 4052)
SQLServer2K(tds80).log:2 (type 4043)
SQLServer2K(tds80).log:2 (type 4049)
SQLServer2K(tds80).log:2 (type 4040)
SQLServer7(tds70).log:21(type 4052)
SQLServer7(tds70).log:21(type 4052)
SQLServer7(tds70).log:21(type 4049)
SQLServer7(tds70).log:21(type 4040)
SQLServer7(tds70).log:21(type 4052)
SQLServer7(tds70).log:21(type 4052)
SQLServer7(tds70).log:21(type 4052)
SQLServer7(tds70).log:21(type 4052)
SQLServer7(tds70).log:21(type 4052)
SQLServer7(tds70).log:21(type 4052)
SQLServer7(tds70).log:21(type 4049)
SQLServer7(tds70).log:21(type 4040)
SQLServer7(tds70).log:21(type 4052)
SQLServer7(tds70).log:21(type 4052)




Archive powered by MHonArc 2.6.24.

Top of Page