Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> binary data transfer (ORA_FFI, JDBC)

binary data transfer (ORA_FFI, JDBC)

From: Uta Loeckx <loeckx_at_uni-muenster.de>
Date: Thu, 28 Jan 1999 17:29:49 +0100
Message-ID: <36B0907D.A970BD6F@ifgi.uni-muenster.de>


I would appreciate help to any of the following problems regarding ORA_ForeignFunctionInterface and OracleJDBCDriver:

I have to develop C/C++ and Java encryption/decryption routines for a project that stores it's data in an ORACLE8 database. The Java applets communicate with the database through an OracleJDBCdriver. The C-DLLs are called via Foreign Function Interface from Developer2000FormsDesigner.Until now, VARCHAR2 is used for data storage. I encountered severe problems while trying to realize the data transfer. The source of the problems is, that VARCHAR2 is a character daty type, but encrypted data is binary.

  1. Oracle Database > Forms > C-Library and back again:

The VARCHAR2 variable is interpreted as CHAR* in C++. It therefore seems impossible to allow 00-bytes in the encrypted data, since ORACLE interprets only the portion of the return string which is prior to the first \00. I could not find any way of calling C/C++ routines other than ORA_FFI. 2. Oracle Database > JDBC > Java and back again:


When executing SQL statements in Java (or preparedStatements) Java/JDBC maps the OracleCharacterSet to it's internal UNICODE format. This leads to a whole lot of question marks in the transmitted string when I try to read one which contains characters with ASCII-code above 7F(hex). I use method ResultSet.getString() for this. ResultSet.getBytes() throws an SQLException.

3. BLOBs and LONG RAWs


I can't create tables with blobs. Statements like the one offered by Thomas Kyte earlier in this discussion group won't work:

SQL> create table widgits
  2 ( widgit_id number ,
  3 widgit_data blob
  4 );
  widgit_data blob

                *

ERROR at line 3:
ORA-00902: invalid datatype
SQL> I can create tables with LONG RAW data, but am not able to select data from it. Anyway I found scarce information about those data types in the Oracle Manual or the Forms Manual. I would also like to know if the types are supported by Forms-PL/SQL and if there is any possibility of using such a variable in a foreign function.

Thanks for listening.


Andreas Jaeger
Institut für Geoinformatik, Universität Münster Robert-Koch-Straße 26/28
D-48149 Münster

Tel.: (0251) 83 - 3 00 11
Fax: (0251) 83 - 3 97 63
mailto:jaeger_at_ifgi.uni-muenster.de


Andreas Jaeger
Hammer Straße 14
D-48153 Münster

Tel.: (0251) 53 37 78


Received on Thu Jan 28 1999 - 10:29:49 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US