Hi,
I have an Oracle data reader that is not returning the contents of a string field when I have verified that the field contains data. Here is the section of code where it happens:
NOTE: I have verified that the field BLB.OLE_OBJECT_BLOB is of type "STRING".
Dim cmdText As Oracle.DataAccess.Client.O
racleComma
nd
Dim rsText As Oracle.DataAccess.Client.O
racleDataR
eader
14900: SQL = " SELECT BLB.OLE_OBJECT_BLOB, ATT.REFERENCE_SUB_NBR "
15000: SQL = SQL & "FROM NUCLEAR.ATTRB_V ATT, NUCLEAR.BLOB_V blb "
15100: SQL = SQL & "WHERE BLB.OLE_OBJECT_ID = ATT.OLE_ID_NOTES "
15200: SQL = SQL & "AND ATT.REFERENCE_TYPE = 'WO' "
15300: SQL = SQL & "AND ATT.ATTRIBUTE_NAME = 'B1 - WORK TASK SCOPE' "
15400: SQL = SQL & "AND ATT.REFERENCE_NBR = '" & rsPM.Item("MODEL_WO_NUMBER
") & "' "
15500: SQL = SQL & "ORDER BY ATT.REFERENCE_SUB_NBR, BLB.GEN_ARG "
15600: cmdText = New Oracle.DataAccess.Client.O
racleComma
nd(SQL, cnDB)
15700: rsText = cmdText.ExecuteReader()
16200: If rsText.HasRows Then
16300: strWorkInst = ""
16400: Do While rsText.Read
16500: If rsText.Item("OLE_OBJECT_BL
OB") <> ". " Then
16600: If strWorkInst = "" Then
16700: strWorkInst = rsText.Item("REFERENCE_SUB
_NBR") & ": " & Trim(rsText.GetString(0))
16800: Else
16900: strWorkInst = strWorkInst & Chr(10) & rsText.Item("REFERENCE_SUB
_NBR") & ": " & Trim(rsText.Item("OLE_OBJE
CT_BLOB"))
17000: End If
17100: End If
17200: Loop
17400: oSheet.Cells(lngRow, j) = "'" & Left(strWorkInst, 31500)
17500: intWICol = j
17600: End If
17700: rsText.Close()
When I run the same select in TOAD the OLE_OBJECT_BLOB field returns a string - here it does not. This is very urgent as it is hindering a production report. Any help would be greatly appreciated.
Start Free Trial