Retrieving BLOBs from ADABAS D via JDBC

Retrieving BLOBs from ADABAS D via JDBC

Post by wor » Thu, 26 Feb 1998 04:00:00



Hi,

I have some problems with reading BLOBs from an ADABAS D
database (Workgroup Edition Solaris) using the JDBC driver
from Software AG.

I am able to insert BLOBs into the database, but when I try
to read the BLOBs from the database the following problems occur:

- reading the BLOB with getBinaryStream:
  If the BLOB contains bytes, which have the byte code 255, the
  read() method returns -1 instead of 255. As this indicates the end of
  a stream, the reading processes is stopped at the first
  occurrence of byte code 255. And this is not the desired
  behaviour.

- reading the BLOB with getString:
  In this case, almost the whole BLOB is retreived, only the last
  character is missing. This error occurs only for BLOBs which
  end with a newline character.

Does anyone have an explanation for this behaviour ? Is it an error
of the JDBC driver or do I have to check any other flags or
values to recognize the correct length of a BLOB ?

Greetings,

Michael Skusa


 
 
 

Retrieving BLOBs from ADABAS D via JDBC

Post by wor » Thu, 26 Feb 1998 04:00:00


Hi,

I have some problems with reading BLOBs from an ADABAS D
database (Workgroup Edition Solaris) using the JDBC driver
from Software AG.

I am able to insert BLOBs into the database, but when I try
to read the BLOBs from the database the following problems occur:

- reading the BLOB with getBinaryStream:
  If the BLOB contains bytes, which have the byte code 255, the
  read() method returns -1 instead of 255. As this indicates the end of
  a stream, the reading processes is stopped at the first
  occurrence of byte code 255. And this is not the desired
  behaviour.

- reading the BLOB with getString:
  In this case, almost the whole BLOB is retreived, only the last
  character is missing. This error occurs only for BLOBs which
  end with a newline character.

Does anyone have an explanation for this behaviour ? Is it an error
of the JDBC driver or do I have to check any other flags or
values to recognize the correct length of a BLOB ?

Greetings,

Michael Skusa



 
 
 

1. BLOBs and JDBC (ADABAS)

Hi,

I have some problems with reading BLOBs from an ADABAS D
database (Workgroup Edition Solaris) using the JDBC driver
from Software AG.

I am able to insert BLOBs into the database, but when I try
to read the BLOBs from the database the following problems occur:

- reading the BLOB with getBinaryStream:
  If the BLOB contains bytes, which have the byte code 255, the
  read() method returns -1 instead of 255. As this indicates the end of
  a stream, the reading processes is stopped at the first
  occurrence of byte code 255. And this is not the desired
  behaviour.

- reading the BLOB with getString:
  In this case, almost the whole BLOB is retreived, only the last
  character is missing. This error occurs only for BLOBs which
  end with a newline character.

Does anyone have an explanation for this behaviour ? Is it an error
of the JDBC driver or do I have to check any other flags or
values to recognize the correct length of a BLOB ? Has anyone had
similar problems with JDBC drivers for other databases ?

Greetings,

Michael Skusa


2. one more ...

3. SQL/DS Adabas

4. diag log lost

5. Retrieving Blob data via OLE DB

6. SQL Transfer and Constraints

7. How to retrieve Blob data via ODBC

8. What is optimum way to summarize the records of another file?

9. Edit/Store/Retrieve/Submit SQL Server Blobs via XML

10. Does JDBC-ODBC bridge support retrieving blob data?

11. retrieving BLOBs from Oracle using JDBC error

12. Retrieving CLOB from Oracle 8 via JDBC

13. Retrieving JPEG's via JDBC