pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: noreply@pgfoundry.org
To: noreply@pgfoundry.org
Subject: [ psqlodbc-Bugs-1001172 ] Problem with ADO.RecordCount
Date: Tue,  2 Jan 2007 17:32:14 +0000 (UTC)
Message-ID: <20070102173214.D5D79216DA8@pgfoundry.org> (raw)

Bugs item #1001172, was opened at 2007-01-02 17:32
You can respond by visiting: 
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1001172&group_id=1000125

Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Paul Röttgerding (paul1234)
Assigned to: Nobody (None)
Summary: Problem with ADO.RecordCount

Initial Comment:
Problem in ODBC and ADO

 DatenbankInfos: 
ADO Version: 2.8
DBMS Name: PostgreSQL
DBMS Version: 8.1.4
OLE DB Version: 02.00
Provider Name: MSDASQL.DLL
Provider Version: 02.81.1117.0
Transaktion: 8
ODBC Name: StudWerkPG
Driver Name: PSQLODBC35W.DLL
Driver Version: 08.02.0203
Driver ODBC Version: 03.51

The Select in PGAdmin 1.6 works.
1362 lines result.

 (screenshot)

In Visual basic via ODBC and ADO it fails with:
-2147467259 
Der Datenprovider oder ein anderer Dienst gab den Status E_FAIL zurück.
 

 
rsstu.source =
select ISW_STUNDEN.IDMELDUNG,sum(BruttoBetrag) as summ from ISW_STUNDEN,ISW_MELDUNGEN where IDOBJEKT=2 and OBJEKTTYP='GEBAEUDE'  and ISW_MELDUNGEN.IDMELDUNG=ISW_STUNDEN.IDMELDUNG  group by ISW_STUNDEN.IDMELDUNG

The Code:
                'Stundenkosten
                  If rsStu.RecordCount > 0 Then      E_Fail with RecordCount
                    rsStu.MoveFirst ' an den Anfang für die erste Suche   MoveFirst works ok
                    rsStu.Find "IDMELDUNG=" & .TextMatrix(i, 0)  E_Fail with Find
                    If rsStu.EOF = False Then ' Objekt nicht vorhanden, deswegen nochmal von vorne durch alle Datensätze suchen
                      'Betr = IIf(IsNull(rsStu(1) = True), 0, rsStu(1))
                      Betr = DbGetSummenValue(rsStu, 1, , 0) 'IIf(IsNull(rsStu(1) = True), 0, rsStu(1))
                    End If
                  End If


Test with rsStu.MoveLast  fails also

Important:  When I use an other where-clause and the resultset have per example 123 rows, all is OK !!
What can I do?
Thanks
Paul


----------------------------------------------------------------------

You can respond by visiting: 
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1001172&group_id=1000125



view thread (4+ messages)  latest in thread

Message-ID: <20070102173214.D5D79216DA8@pgfoundry.org>
Permalink:  ../20070102173214.D5D79216DA8@pgfoundry.org/
Also on:    postgresql.org/message-id/20070102173214.D5D79216DA8@pgfoundry.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: noreply@pgfoundry.org
  Subject: Re: [ psqlodbc-Bugs-1001172 ] Problem with ADO.RecordCount
  In-Reply-To: <20070102173214.D5D79216DA8@pgfoundry.org>
  References: <20070102173214.D5D79216DA8@pgfoundry.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox