[ 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-25 03:55:47
Message-ID: 20070125035547.0275E217247@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: Closed
Resolution: None
Priority: 3
Submitted By: Paul Röttgerding (paul1234)
Assigned to: Hiroshi Inoue (hinoue)
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

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

Comment By: Paul Röttgerding (paul1234)
Date: 2007-01-24 21:08

Message:
That it is.
Now my recordcount is ok and there is no more Problem with
the bytea Type.
The Version is 08.02.0204 (the same as before).
Thanks
Paul

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

Comment By: Hiroshi Inoue (hinoue)
Date: 2007-01-23 14:43

Message:
Please retry the snapshot dll.
I found a bug in the previous version.

regards,
Hiroshi Inoue

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

Comment By: Paul Röttgerding (paul1234)
Date: 2007-01-23 09:32

Message:
with setting to 1 its the following error.
Fehler -2147467259 (Could not convert binary other than LO
type) in Procedur BtnPicSpeichern von Modul fmplus

ADO-Setting:
Provider=MSDASQL.1;Extended
Properties="DSN=StudWerkPG;DATABASE=fmplusDB;SERVER=localhos
t;PORT=5432;UID=aod;PWD=fmplus;SSLmode=disable;ReadOnly=0;Pr
otocol=7.4-
1;FakeOidIndex=0;ShowOidColumn=0;RowVersioning=0;ShowSystemT
ables=1;ConnSettings=;Fetch=1000;Socket=4096;UnknownSizes=0;
MaxVarcharSize=254;MaxLongVarcharSize=8190;Debug=0;CommLog=0
;Optimizer=1;Ksqo=1;UseDeclareFetch=1;TextAsLongVarchar=1;Un
knownsAsLongVarchar=0;BoolsAsChar=1;Parse=1;CancelAsFreeStmt
=0;ExtraSysTablePrefixes=dd_;;LFConversion=1;UpdatableCursor
s=1;DisallowPremature=0;TrueIsMinus1=0;BI=0;ByteaAsLongVarBi
nary=1;UseServerSidePrepare=1;LowerCaseIdentifier=0;XaOpt=1"

remember:
in 8.02.03 it works when bytea as LO is checked (=1)
(but there was the Problem with the recordcount)

Thanks
Paul

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

Comment By: Hiroshi Inoue (hinoue)
Date: 2007-01-21 00:23

Message:
Please try to change the setting of ByteaAsLongVarBinary
from 0 to 1 in your ado setting.

regards,
Hiroshi Inoue

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

Comment By: Paul Röttgerding (paul1234)
Date: 2007-01-20 14:42

Message:
Hello,
Setting: .LockType = adLockOptimistic
when bytea as LO is checked i have:
Error -2147467259 (Could not convert binary other than LO
type) in Procedur BtnPicSpeichern von Modul fmplus

when bytea as LO is unchecked i have:
Fehler -2147217887 (Fehler bei einem aus mehreren Schritten
bestehenden Vorgang. Prüfen Sie die einzelnen
Statuswerte.) in Procedur BtnPicSpeichern von Modul fmplus

It dont works anywhere.
Here my ado settings:
DBMS Version: 8.1.4

Provider=MSDASQL.1;Extended
Properties="DSN=StudWerkPG;DATABASE=fmplusDB;SERVER=localhos
t;PORT=5432;UID=aod;PWD=fmplus;SSLmode=disable;ReadOnly=0;Pr
otocol=7.4-
1;FakeOidIndex=0;ShowOidColumn=0;RowVersioning=0;ShowSystemT
ables=1;ConnSettings=;Fetch=1000;Socket=4096;UnknownSizes=0;
MaxVarcharSize=254;MaxLongVarcharSize=8190;Debug=0;CommLog=0
;Optimizer=1;Ksqo=1;UseDeclareFetch=1;TextAsLongVarchar=1;Un
knownsAsLongVarchar=0;BoolsAsChar=1;Parse=1;CancelAsFreeStmt
=0;ExtraSysTablePrefixes=dd_;;LFConversion=1;UpdatableCursor
s=1;DisallowPremature=0;TrueIsMinus1=0;BI=0;ByteaAsLongVarBi
nary=0;UseServerSidePrepare=1;LowerCaseIdentifier=0;XaOpt=1"

Any Idea
Thanks
Paul

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

Comment By: Hiroshi Inoue (hinoue)
Date: 2007-01-18 01:11

Message:
Please note I changed the LockType i.e
.LockType = adLockOptimistic
because adLockPessimistic raises an error
at AddNew().

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

Comment By: Hiroshi Inoue (hinoue)
Date: 2007-01-17 07:20

Message:
Hmm the similar code works here.
Well how does the Bytea As LO option affect ?

regards,
Hiroshi Inoue

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

Comment By: Paul Röttgerding (paul1234)
Date: 2007-01-17 01:06

Message:
with the new dll it works.
But now i have problems to insert my buttonpicturegraphics
in the following table.
CREATE TABLE admbutton_icons
(
id bigint,
modul character varying(50),
nr integer,
icon bytea
)
WITHOUT OIDS;
ALTER TABLE admbutton_icons OWNER TO aod;

The errormessages changes for the same function.
Se the attached file.
Paul

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

Comment By: Hiroshi Inoue (hinoue)
Date: 2007-01-13 23:45

Message:
Please try the attached dll.

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

Comment By: Hiroshi Inoue (hinoue)
Date: 2007-01-08 00:27

Message:
I'm having a trouble with my PC, sorry.
It would take a few days to recover my development
environment.

regards,
Hiroshi Inoue

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

Comment By: Paul Röttgerding (paul1234)
Date: 2007-01-05 16:52

Message:
OK!
when i turn off the Parse statement option it works.
But the behavior isnt ok.
In which case do i have to use the Parse Statement Option?
I think (mybe i think wrong) that the sql have to work with
or without parse Statement

What do you mean ?
Paul

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

Comment By: Hiroshi Inoue (hinoue)
Date: 2007-01-04 23:54

Message:
Oops sorry, you already attached the Mylog output.

Could you try to turn off the Parse statement option ?

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

Comment By: Hiroshi Inoue (hinoue)
Date: 2007-01-04 23:45

Message:
Could you send me the Mylog output ?

regards,
Hiroshi Inoue

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

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 imad 2007-01-25 07:44:17 Re: Postgres Stored Procedure Call Function Return Type OID Caching Problem
Previous Message Feng Chen 2007-01-24 22:44:39 Re: Postgres Stored Procedure Call Function Return Type OID Caching Problem