VB6 & Oracle XE BLOB gives garbeled results
I have checked everywhere and hope that you can solve this simple puzzle. I am using VB6 and ADO to read Oracle Express 10g tables on my 32-bit Windows 7 Home Premium computer. My routine to read blog fields works on my XP & Vista MS SQL systems but gives me garbled results on the Oracle XE. My routine is as follows,
Dim TempString As String
Dim vData As Variant
Dim L as Long
szQuery = "SELECT task_memo FROM TASKMEMO WHERE task_id = '" & TaskId
Err.Clear
Set rsSUB = cn.Execute(szQuery)
DoEvents
If Err.Number = 0 Then
While Not rsSUB.EOF
If Not IsNull(rsSUB("task_memo")) Then
L = rsSUB.Fields("task_memo").ActualSize
vData = rsSUB("task_memo").GetChunk(L) & " " ' blob
If Not IsEmpty(vData) Then
TempString = vData ' Convert the variant to a string
Else
TempString = ""
End If
End If
The return is a string (TempString) at the proper length but reads like the following,
??????????????†????????????????????????????†????4???????†????????????
Every read other than for blobs works perfectly. Can anyone out there tell me what I am doing wrong? Your suggestions are greatly needed.