Problem with the read only clause for read only cursors
Problem with the read only clause for read only cursors
am 19.08.2009 01:59:12 von Tom Goodman
Hi,
I just loaded the 08.04 psqlodbc drivers on a new machine, but ran into
a problem where this version is improperly marking ALL fields in
recordsets as read-only. I presume that this is related to the recent
change that restored the "read only clause for read only cursors".
The final line in the procedure below fails with an ADO error message:
(80040e21) "Multiple-step operation generated errors. Check each status
value."
When comparing psqlodbc 08.04 and 08.03 I see that in 08.03 all of the
fields of the recordset have the adFldUpdatable flag set in each field's
..Attributes. In 08.04 none of the fields have this flag set.
Since this code runs without error when connecting to non-postgresql
databases, I believe that psqlodbc is not properly setting the
adFldUpdatable for the values of CursorLocation, CursorType, and LockType.
Is this a bug? Can it be addressed?
Private Sub Command1_Click()
Dim CS As String
CS = "DRIVER={PostgreSQL ANSI};" _
& "SERVER=theserver;" _
& "PORT=5432;" _
& "DATABASE=mydatabase;" _
& "MaxVarcharSize=16777216;" _
& "MaxLongVarcharSize=16777216;" _
& "BoolsAsChar=0;"
Dim Connection As ADODB.Connection
Set Connection = New Connection
Connection.CursorLocation = adUseClient
Connection.Mode = adModeShareDenyNone
Connection.Open CS, C_UserName, C_Password
'Create a table to insert records into
Connection.Execute "CREATE TEMP TABLE Test (ID INTEGER, Data CHARACTER
VARYING(25))"
Dim RS As ADODB.Recordset
Set RS = New Recordset
RS.CursorLocation = adUseClient
RS.CursorType = adOpenDynamic 'but after the .Open the value will be
adOpenStatic
RS.LockType = adLockBatchOptimistic
RS.Open "SELECT * FROM Test LIMIT 1", Connection
'This next line gives a multi-step operation error in psqlodbc 08.04,
' but succeeds in 08.03.
'It succeeds when using Jet and Access mdb databases, so I believe that
' it is an error to fail here.
RS.AddNew Array("ID", "Data"), Array(1, "Hi mom!")
End Sub
Thanks
P.S. Sorry for the VB6 code here, but that is what the app is built in.
--
Tom Goodman, email TomGoodman@FBE-inc.com
, web http://fbe-inc.com/
FBE Associates, Inc., 513 N Madison Ave, Suite 101, Bay City, MI
48708-6460, USA
Phone 989 894 2785, Fax 989 894 2805, Toll Free 866 894 2785
* God grant me the serenity to accept the code I cannot change
* the courage to change the code I can change
* and the wisdom to know the difference
--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc
Re: Problem with the read only clause for read only cursors
am 23.08.2009 11:41:04 von Hiroshi Inoue
Tom Goodman wrote:
> Hi,
>
> I just loaded the 08.04 psqlodbc drivers on a new machine, but ran into
> a problem where this version is improperly marking ALL fields in
> recordsets as read-only. I presume that this is related to the recent
> change that restored the "read only clause for read only cursors".
>
> The final line in the procedure below fails with an ADO error message:
> (80040e21) "Multiple-step operation generated errors. Check each status
> value."
>
> When comparing psqlodbc 08.04 and 08.03 I see that in 08.03 all of the
> fields of the recordset have the adFldUpdatable flag set in each field's
> .Attributes. In 08.04 none of the fields have this flag set.
>
> Since this code runs without error when connecting to non-postgresql
> databases, I believe that psqlodbc is not properly setting the
> adFldUpdatable for the values of CursorLocation, CursorType, and LockType.
>
> Is this a bug? Can it be addressed?
Could please try the drivers on testing for 8.4.0101 at
http://www.geocities.jp/inocchichichi/psqlodbc/index.html
?
regards,
Hiroshi Inoue
--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc
Re: Problem with the read only clause for read only cursors
am 24.08.2009 16:17:28 von Tom Goodman
This is a multi-part message in MIME format.
--------------040004010201030301080903
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
The testing drivers 8.4.0101 psqlodbc30a worked fine. Wonderful.
Is this a rollback to the previous behavior, or does this version use
different code for the client side cursor? Or, I suppose this is a
better question: Is this a permanent fix that will be included in the
next official release, or is it a temporary fix just for me?
Thanks,
Tom
Hiroshi Inoue wrote:
> Tom Goodman wrote:
>> Hi,
>>
>> I just loaded the 08.04 psqlodbc drivers on a new machine, but ran
>> into a problem where this version is improperly marking ALL fields in
>> recordsets as read-only. I presume that this is related to the recent
>> change that restored the "read only clause for read only cursors".
>>
>> The final line in the procedure below fails with an ADO error
>> message: (80040e21) "Multiple-step operation generated errors. Check
>> each status value."
>>
>> When comparing psqlodbc 08.04 and 08.03 I see that in 08.03 all of
>> the fields of the recordset have the adFldUpdatable flag set in each
>> field's .Attributes. In 08.04 none of the fields have this flag set.
>>
>> Since this code runs without error when connecting to non-postgresql
>> databases, I believe that psqlodbc is not properly setting the
>> adFldUpdatable for the values of CursorLocation, CursorType, and
>> LockType.
>>
>> Is this a bug? Can it be addressed?
>
> Could please try the drivers on testing for 8.4.0101 at
> http://www.geocities.jp/inocchichichi/psqlodbc/index.html
> ?
>
> regards,
> Hiroshi Inoue
>
Tom Goodman, email TomGoodman@MHProEZ.com
1406 Tenth St., Bay City, MI 48708, USA, Phone 989 893 1450
* God grant me the serenity to accept the code I cannot change
* the courage to change the code I can change
* and the wisdom to know the difference
--------------040004010201030301080903
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
The testing drivers 8.4.0101 psqlodbc30a worked fine. Wonderful.
Is this a rollback to the previous behavior, or does this version use
different code for the client side cursor? Or, I suppose this is a
better question: Is this a permanent fix that will be included in the
next official release, or is it a temporary fix just for me?
Thanks,
Tom
Hiroshi Inoue wrote:
Tom
Goodman wrote:
Hi,
I just loaded the 08.04 psqlodbc drivers on a new machine, but ran into
a problem where this version is improperly marking ALL fields in
recordsets as read-only. I presume that this is related to the recent
change that restored the "read only clause for read only cursors".
The final line in the procedure below fails with an ADO error message:
(80040e21) "Multiple-step operation generated errors. Check each status
value."
When comparing psqlodbc 08.04 and 08.03 I see that in 08.03 all of the
fields of the recordset have the adFldUpdatable flag set in each
field's .Attributes. In 08.04 none of the fields have this flag set.
Since this code runs without error when connecting to non-postgresql
databases, I believe that psqlodbc is not properly setting the
adFldUpdatable for the values of CursorLocation, CursorType, and
LockType.
Is this a bug? Can it be addressed?
Could please try the drivers on testing for 8.4.0101 at
?
regards,
Hiroshi Inoue
--------------040004010201030301080903--
Re: Problem with the read only clause for read only cursors
am 26.08.2009 01:30:31 von Hiroshi Inoue
Tom Goodman wrote:
> The testing drivers 8.4.0101 psqlodbc30a worked fine. Wonderful.
Thanks.
> Is this a rollback to the previous behavior, or does this version use
> different code for the client side cursor?
Partially yes and some code was added.
> Or, I suppose this is a
> better question: Is this a permanent fix that will be included in the
> next official release, or is it a temporary fix just for me?
The fix will be included in the next release unless related bugs are
reported.
> Thanks,
> Tom
>
>
> Hiroshi Inoue wrote:
>> Tom Goodman wrote:
>>> Hi,
>>>
>>> I just loaded the 08.04 psqlodbc drivers on a new machine, but ran
>>> into a problem where this version is improperly marking ALL fields in
>>> recordsets as read-only. I presume that this is related to the recent
>>> change that restored the "read only clause for read only cursors".
>>>
>>> The final line in the procedure below fails with an ADO error
>>> message: (80040e21) "Multiple-step operation generated errors. Check
>>> each status value."
>>>
>>> When comparing psqlodbc 08.04 and 08.03 I see that in 08.03 all of
>>> the fields of the recordset have the adFldUpdatable flag set in each
>>> field's .Attributes. In 08.04 none of the fields have this flag set.
>>>
>>> Since this code runs without error when connecting to non-postgresql
>>> databases, I believe that psqlodbc is not properly setting the
>>> adFldUpdatable for the values of CursorLocation, CursorType, and
>>> LockType.
>>>
>>> Is this a bug? Can it be addressed?
>>
>> Could please try the drivers on testing for 8.4.0101 at
>> http://www.geocities.jp/inocchichichi/psqlodbc/index.html
>> ?
>>
>> regards,
>> Hiroshi Inoue
>>
> Tom Goodman, email TomGoodman@MHProEZ.com
> 1406 Tenth St., Bay City, MI 48708, USA, Phone 989 893 1450
> * God grant me the serenity to accept the code I cannot change
> * the courage to change the code I can change
> * and the wisdom to know the difference
--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc