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

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

am 02.01.2007 18:32:14 von noreply

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=10011 72&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=10011 72&group_id=1000125

---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at

http://www.postgresql.org/about/donate