On Sun, 30 Sep 2007 12:24:34 +0200
Tommi Mäkitalo <[EMAIL PROTECTED]> wrote:

> Hi,
> 
> thank you Mark. That did the job at least on my fresh x86-oracle-xe 
> installation. I will check that on AIX later.

Hello Tommi,

That's good, thanks.
 
> But I still wonder, if this is really the way to do it. It looks
> really odd. I studied the oracle-documentation a little and see, that
> this OCINumber-stuff looks incomplete. It really looks, like oracle
> expects us to get the OCINumber as a string and then convert it to
> whatever we need. Can you point me to the documentation about your
> solution. I would like to verify it.
> 
> Tommi

The Oracle documentation, like their C API, is not very
helpful with 64 bit integers and decimal data types.
In chapter 3 of the Oracle Call Interface
Programmer's Guide, section External Datatypes:

http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28395/oci03typ.htm#i423688

There is a table which has int, but does not have any
C 64 bit integers or decimal data types, except for
char[22] with SQLT_VNU.  Below that is a section on
NUMBER, which starts with the following quote:

| NUMBER
|
| You should not need to use NUMBER as an external datatype.

There is no hint at what I am supposed to use instead.

| If you do use it, Oracle returns numeric values in its
| internal 21-byte binary format and will expect this format
| on input. The following discussion is included for
| completeness only.

| Note:
| If you are using objects in an Oracle database server,
| you can work with a special OCINumber datatype using a
| set of predefined OCI functions. Refer to Chapter 12,
| "Object-Relational Datatypes in OCI" for more information
|  about this datatype.

I am not using objects.

I have written a little program using the Oracle C++
interface OCCI, using Object-Relational Datatypes.
But the problem with that is it will only work
with Oracle.  I prefer the idea of using tntdb which
supports PostgreSQL, MySQL, and SQLite as well.

Since I am not using objects, I took this note to
mean that I should not use the special OCINumber
datatype.

However that left me with the conclusion that the
Oracle OCI will not directly input and output
64 bit integers or decimal data types, even
in the recently release Oracle 11g, and that I
would have to figure it out myself.

I also found an external link that describes the
Oracle number implementation:

http://www.ixora.com.au/notes/number_representation.htm

Thanks, Mark

-- 

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Tntnet-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tntnet-general

Reply via email to