OracleDataAdapter doesn't read the whole content

P

pascal etter

Hi together

I have the following situation:
I have a table in my oracle db called "actionattachments" which contains 2
columns,
actionid (integer) and bytedata (long raw).
To get the data I use the oracledataadapter but there is one problem. Tha
adapter
does not get all of the bytes stored in the bytedata column.

For example:
The bytedata field with the actionid "16264" contains 8444 Bytes.
But the datareader only gets 8192 of them.
The strange thing is that the number of bytes the dataadapter gets is always
divisible by 256.
I tried id with the oledb provider instead of the oracleclient and
everything worked fine.
I also tried it with an oracledatareader instead of the dataadapter, but I
got the
same result.

Can anybody help me?

Sorry about the bad english, it's early in the morning;-)

Thanks in advance
pascal


This is the code:
Dim objDataSet As New DataSet()
Dim strSQL As String = "Select Bytedata, ActionId From
actionattachments Where ActionID = " & vIntActionID

Dim objConnection As New OracleClient.OracleConnection()
objConnection.ConnectionString = "Password=mypassword;User
ID=myuser;Data Source=mydatasource"

objConnection.Open()

Dim oda As New OracleClient.OracleDataAdapter(strSQL, objConnection)
Try
oda.Fill(objDataSet, "vdxDataSet")
objDataSet.Tables(0).TableName = "vdxDataTable"
Catch eFillException As System.Exception
Throw eFillException
Finally
objConnection.Close()
End Try
Return (objDataSet)
 
P

pascal etter

Sorry, I forgot to tell you that I use VB.Net and the .net framework 1.0
with the oracleclient-provider from microsoft.
 
V

Val Mazur \(MVP\)

Hi,

It could be that you need to put your blob field to the end of the selected
fields. Not sure how Oracle .NET Managed provider works, but in OLEDB all
BLOB fields should be at the end to select them. Try

"Select ActionId, Bytedata From ....
 
Top