Bug #28891 BLOB VB6 IsNull-Test destroys BLOB-Info
Submitted: 5 Jun 2007 6:47 Modified: 13 Jun 2007 15:35
Reporter: Thomas Hermann Email Updates:
Status: Duplicate Impact on me:
None 
Category:Connector / ODBC Severity:S2 (Serious)
Version:3.51.14, 3.51.16r491 OS:Windows (XP)
Assigned to: CPU Architecture:Any
Tags: "IsNull-Test destroys BLOB-Info", BLOB, VB6

[5 Jun 2007 6:47] Thomas Hermann
Description:
MySQL 5.0.34
ODBC 3.51.14

When testing a BLOB data field with "If isNull(...) then ", its contents is lost.

How to repeat:
Run the attached sample project
[5 Jun 2007 7:00] Thomas Hermann
Sample Project

Attachment: BLOBProblem.zip (application/zip, text), 25.90 KiB.

[6 Jun 2007 8:18] Thomas Hermann
As I continue testing the same behavior occurs also with data fields type TEXT.
While a record contains "abcedefghijk" before testing, ist has lost its contents after it confirmed the "not Null" status and returns an empty string.
[13 Jun 2007 15:35] Tonci Grgin
Hi Thomas and thanks for yet another report.

I believe this is a duplicate of Bug#27458. In any case all data is correctly stored and available for fetch, just not in loop.
[4 Sep 2007 16:26] Oscar Tordera
I have the same problem look at my code:

set rslan = Server.CreateObject("ADODB.RecordSet")
sqllan = "SELECT * FROM TDLDescripcion WHERE Nombre like 'pie'"
rslan.Open sqllan,Conn

if not rslan.EOF then
	response.Write("antes " & len(rslan("Texto")) & " antes")
	response.Write("<br>IsNULL -> " & isNULL(rslan("Texto")) & "<br>")
	response.Write("despues " & len(rslan("Texto")) & " despues")
end if

the first response.write prints 358 then last one prints 0. Someone can help me pls.
[11 Sep 2007 15:30] Tonci Grgin
Oscar, probable cause of your problem is ADO Update criteria. Search MSDN for explanation of my line from test case attached:
rs.Properties("Update Criteria").Value = 0 'adCriteriaKey
[11 Sep 2007 15:32] Tonci Grgin
VB VS205 test case

Attachment: Bug28891VB.txt (text/plain), 2.91 KiB.

[11 Sep 2007 15:34] Tonci Grgin
Test picture

Attachment: testpicture.jpg (image/jpeg, text), 23.17 KiB.