[ psqlodbc-Bugs-1001172 ] Problem with ADO.RecordCount

From: <noreply(at)pgfoundry(dot)org>
To: noreply(at)pgfoundry(dot)org
Subject: [ psqlodbc-Bugs-1001172 ] Problem with ADO.RecordCount
Date: 2007-01-02 17:32:14
Message-ID: 20070102173214.D5D79216DA8@pgfoundry.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

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

Browse pgsql-odbc by date

  From Date Subject
Next Message Erika Marlow 2007-01-02 18:00:09 Re: error message "column "oid" doesn't exist"
Previous Message Ludek Finstrle 2007-01-02 16:47:56 Re: Error