| Bug #10628 | Visual Basic 6 with MyODBC clears buffered text and blob field contents | ||
|---|---|---|---|
| Submitted: | 13 May 2005 16:57 | Modified: | 11 May 2007 18:06 |
| Reporter: | Christian Coish | Email Updates: | |
| Status: | Duplicate | Impact on me: | |
| Category: | Connector / ODBC | Severity: | S3 (Non-critical) |
| Version: | 3.51.11-2 | OS: | Windows (Windows 2000) |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | ODBC5-RC | ||
[17 May 2005 7:34]
Vasily Kishkin
Tested on Win 2000 Sp4 , Microsoft Visual Basic 6.0, MyODBC 3.51.11. Test case is attached.
[17 May 2005 7:35]
Vasily Kishkin
test program
Attachment: 10628.zip (application/x-zip-compressed, text), 9.17 KiB.
[9 May 2006 13:51]
Robert Simpson
The same problem occurs using ASP VBScript. Set the value of a local variable to the contents of the text/blob fields. Use the local variable for all other needs. This is not a solution, but a work-around.
[31 Jul 2006 21:19]
Zilan Ciftci
Anyone have a patch for this? did a uppgrade to mysql 5.0 and got some problems with SUM, downloaded the latest odbc driver and ended up with this bug. Don't wanna go thrue all the code and change it.. it was working fine before..
[11 May 2007 18:06]
Jim Winstead
This is not a bug. Accessing a BLOB/CLOB in ADO twice is not allowed by the ODBC specification. See the notes from Jess Balint in bug #16866.

Description: When using Visual Basic 6 and ADO with the MyODBC driver and updateable Recordsets, text and blob field data is cleared from the recordset after the first time it is read. This does not clear it from the database itself, but only allows the contents of the recordset to appear once. I am using version 2.7 of ADO. The problem only occurs with the text and blob type fields, all other types (varchar, int, etc.) can be read as many times as desired. This may be more of a problem with VB6 or ADO than MyODBC, since the same driver works fine in C# using System.Data.Odbc. How to repeat: Assuming you have an Open connection 'Conn', to a database that contains a table named 'test' with a field named 'Text_Field'. The first entry in test has Text_Field set to 'testing'. Sql = "SELECT Text_Field FROM test" RS.Open Sql, Conn If Not RS.EOF Then Result1 = RS!Text_Field.Value 'Result1 contains "testing" Result2 = RS!Text_Field.Value 'Result2 contains an empty string End If