Re: is this a odbc bug?

From: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
To: <htakada(at)gmail(dot)com>, <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: is this a odbc bug?
Date: 2005-11-15 18:57:00
Message-ID: 000701c5ea16$5d695597$6a01a8c0@valehousing.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc


-----Original Message-----
From: "Hugo"<htakada(at)gmail(dot)com>
Sent: 15/11/05 18:52:04
To: "pgsql-odbc(at)postgresql(dot)org"<pgsql-odbc(at)postgresql(dot)org>
Subject: [ODBC] is this a odbc bug?

>. now I installed the 8.1.0 plus the odbc driver ,
> and now my application is returning wrong results ,

Upgrade to 08.01.0101 and sanity should return :-)

Regards, Dave

-----Unmodified Original Message-----
Hi , has anybody experienced any problem with the odbc driver that comes
with postgres 8.1.0 , I was testing my application against the beta 4 and
everything was working OK, now I installed the 8.1.0 plus the odbc driver ,
and now my application is returning wrong results , the application is the
same, no one modification was done, if I run my query from withing the
interactive sql editor of pgAdmin, the query returns what it is supposed to
return, the same query from my application doesnt work ( I tested the query
in PowerBulder 8 and VASmalltalk 7 both with same wrong result).

I would appreciate any hint on this

thanks in advance

Hugo

below is the query, this query should return rows with D's and P's , but it
returns only rows with D's, the problem is that if I count the rows I
realize that it returns all the rows it should (642), but it returns all of
them with D's, if I run the same query from pgAdmin it returns all the
rows(642) but with the correct values , 412 P's and 230 D's

*****
select distinct 'D' as estado , zona, ano, campana , contrato
from comisiones.avon as avon
where zona = :zona and ano = :ano and campana = :campana
and tipo in ('50')
and subtipo in ('02' , '03')
group by zona, ano, campana , contrato

union

select distinct 'D' as estado , zona, ano, campana , contrato
from comisiones.viru as viru
where zona = :zona and ano = :ano and campana = :campana
and tipo in ('50')
and subtipo in ('02' , '03')
group by zona, ano, campana , contrato

union

select distinct 'P' as estado, zona, ano, campana , contrato
from comisiones.avon as avon
where zona = :zona and ano = :ano and campana = :campana
and tipo in ('10', '20')
and subtipo in ('01')
and contrato not in (
select distinct contrato
from comisiones.viru as viru
where zona = :zona and ano = :ano and campana = :campana
and tipo in ('10', '20')
and subtipo in ('01')

)
group by zona, ano, campana , contrato

union

select distinct 'P' as estado, zona, ano, campana , contrato
from comisiones.viru as viru
where zona = :zona and ano = :ano and campana = :campana
and tipo in ('10', '20')
and subtipo in ('01')
and contrato not in (
select distinct contrato
from comisiones.avon as avon
where zona = :zona and ano = :ano and campana = :campana
and tipo in ('10', '20')
and subtipo in ('01')
)

group by zona, ano, campana , contrato

union
SELECT DISTINCT 'P' as estado, avon.zona as zona, avon.ano as ano ,
avon.campana as campana , avon.contrato
FROM comisiones.avon as avon,
comisiones.viru as viru
WHERE ( avon.zona = viru.zona ) and
( avon.contrato = viru.contrato ) and
( avon.ano = viru.ano ) and
( avon.campana = viru.campana ) and
avon.zona = :zona and avon.ano = :ano and avon.campana = :campana
and ( ( avon.tipo in ('10', '20')
and avon.subtipo in ('01') )
and ( viru.tipo in ('10', '20')
and viru.subtipo in ('01') ))

*****
<pgsql-odbc(at)postgresql(dot)org>

Browse pgsql-odbc by date

  From Date Subject
Next Message Antonio 2005-11-15 20:32:07 Asking for name/password and connecting
Previous Message Bruce Momjian 2005-11-15 18:56:52 Mailing list activity