Skip site navigation (1) Skip section navigation (2)

Re: Odd behaviour - *possible* ODBC bug?

From: "Jonathan Stanford" <jstanford(at)iee(dot)org>
To: "pgsql-hackers" <pgsql-hackers(at)postgresql(dot)org>, <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: Odd behaviour - *possible* ODBC bug?
Date: 2000-09-19 01:36:32
Message-ID: 003201c021da$0b615850$8119fea9@w2kpro (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-odbc
Hiroshi

Your ::int works a treat.

Thanks

Jon

----- Original Message -----
From: "Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp>
To: "Jonathan Stanford" <jstanford(at)iee(dot)org>
Cc: "pgsql-hackers" <pgsql-hackers(at)postgresql(dot)org>;
<pgsql-odbc(at)postgresql(dot)org>
Sent: Tuesday, September 18, 2001 4:12 AM
Subject: Re: [ODBC] Odd behaviour - *possible* ODBC bug?


> -----Original Message-----
> From: Jonathan Stanford
>
> > Guys,
>
> > I have some odd behaviour with VB6 & postgresql that may be a bug - I
> would appreciate someone else > > replicating this; or any other
suggestions
> anyone might have.
>
> [snip]
>
> > PostgreSQL code:
>
> > CREATE TABLE tb_search (
> > session_id int,
> > emp_id int,
> > rank int
> > );
>
> > and some data:
>
> > insert into tb_search (session_id , emp_id, rank) values (1,101, 5);
>
> [snip several insert commands]
>
> > VB Code:
>
> [snip]
>
> > sSQL = "SELECT  emp_id, sum(rank) "
> > sSQL = sSQL & "FROM tb_search  "
> > sSQL = sSQL & "ON e.emp_id = s.emp_id "
> > sSQL = sSQL & "WHERE session_id = " & lSesh
> > sSQL = sSQL & " GROUP BY emp_id "
> > sSQL = sSQL & " ORDER BY sum(rank) DESC"
>
> > frmEmpSearch.Caption = sOrigCapt & " - retrieving results"
> > Set rsEmps = New ADODB.Recordset
> > rsEmps.CursorLocation = adUseClient 'adUseServer
> > rsEmps.Open sSQL, DBConn, adOpenForwardOnly, adLockReadOnly
>
> I don't think it's an ODBC driver's bug.
> The cause is that PostgreSQL returns NUMERIC type as sum(int).
>
> adUseClient for CursorLocation property indicates ADO to use
> Microsoft Cursor Service for OLE DB. Microsoft Cursor service
> seems to think that sum(rank) is of type int but PostgreSQL
> returns NUMERIC type. I don't know what should be done here.
> Please change sum(rank) -> sum(rank)::int and try.
>
> regards,
> Hiroshi Inoue
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org


In response to

pgsql-hackers by date

Next:From: Philip WarnerDate: 2000-09-19 03:59:50
Subject: Cascade delete views?
Previous:From: Philip WarnerDate: 2000-09-19 01:33:00
Subject: Re: Re: pg_dump tries to do too much per query

pgsql-odbc by date

Next:From: Max KhonDate: 2000-12-14 13:58:33
Subject: more odbc patches
Previous:From: Jonathan StanfordDate: 2000-09-18 00:36:09
Subject: Odd behaviour - *possible* ODBC bug?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group