Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

OracleBlob/LiteLob Length or GetBytes fails with S1000[POL-3314]

497530Dec 20 2006
Trying to access OracleBlob Length or GetBytes fails with S1000[POL-3314], has anyone found a solution to this problem?

Oracle.DataAccess.Lite.OracleException: S1000[POL-3314] unknown error
at Oracle.DataAccess.Lite.OracleConnection.OE(IntPtr stmt, Int16 r, String reason)
at Oracle.DataAccess.Lite.OracleConnection.OE(Int16 r, String msg)
at Oracle.DataAccess.Lite.OracleBlob.OE(Int16 r, String msg)
at Oracle.DataAccess.Lite.OracleBlob.GetBytes(Int64 pos, Byte[] bytes, Int32 offset, Int32 len)

Our code for converting Blob to byte array works on WinCE, however fails on Win32:

byte[] data = new byte[blob.Length];
int pos = 0;
while (pos < blob.Length)
{
byte[] buffer = blob.GetBytes(pos, (int)blob.Length);
Array.Copy(buffer, 0, data, pos, buffer.Length);
pos = pos + buffer.Length;
}
return data;

or

int chunkSize = 64;
long offSet = 0;
byte[] buffer = new byte[chunkSize];
long chunk;
using (MemoryStream memoryStream = new MemoryStream())
{
do
{
chunk = blob.GetBytes(offSet, buffer, 0, chunkSize);
memoryStream.Write(buffer, 0, (int)chunk);
offSet += chunk;
} while (chunk > 0);
return memoryStream.ToArray();
}
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 17 2007
Added on Dec 20 2006
0 comments
1,211 views