FLOAT's and ProC

From: Juergen Schmied <schmied_at_informatik.uni-wuerzburg.de>
Date: 1 Aug 1994 15:15:05 GMT
Message-ID: <31j3hp$7q5_at_winx03.informatik.uni-wuerzburg.de>


Hi,

I have a little problem with numbers of the type float: I have created a table test with the following statement:

   CREATE TABLE test (val FLOAT);

After this, I want to insert a float-value into this table:

   value = 2.9;
   EXEC SQL INSERT INTO test VALUES (:value);

value is declared as following:

  EXEC SQL BEGIN DECLARE SECTION;
     double value;
  EXEC SQL END DECLARE SECTION; After compiling and running the program, the program makes a core-dump at the point where the insert-statement is.

With the debugger I get the following information:

(dbx) where
> 0 oarren(0x100118f0, 0x7fffa524, 0x7fffa510, 0x10000ea0,
0x7fffae6a) ["oar.c":1555, 0x42f84c]

   1 ttcf2n(0x0, 0x0, 0x0, 0x1, 0x7fffb05c) ["ttcx2y.c":496, 0x42afa0]   2 ttcacs.ttcacs(0x7fffb24c, 0x0, 0x0, 0x1, 0x0) ["ttcacs.c":203, 0x422a90]

   3 ttcdrv.ttcdrv(0x0, 0x10000ec8, 0x0, 0x0, 0x10000ea0) ["ttcdrv.c":356, 0x41c49c]

   4 osnwat(0x0, 0x0, 0x50, 0x10000ec8, 0x0) ["osnmis.c":29, 0x40c278]   5 upirtr(0x0, 0x1000c688, 0x0, 0x2, 0x400b80) ["upiprv.c":368, 0x419748]

   6 upiexn(0x10000ad0, 0x10000ad4, 0x40044c, 0x0, 0x4005d0) ["upiexf.c":86, 0x416d0c]

   7 sqlexe.sqlexe(0x4, 0x4, 0x10012005, 0x10000ad4, 0x10007c20) ["sqlexe.c":59, 0x400b7c]

   8 main() ["float.c":297, 0x4005cc]
(dbx)

I have no problems if I'm inserting constant values like

   EXEC SQL INSERT INTO test VALUES (2.9);

or if I use numbers of the type integer.

What I am doing wrong?
(I am using ORACLE V6 with an dec-station 5000/120 (ultrix)).

Thanks,
Juergen.

--
 
------------------------------------------------------------------------
 Juergen Schmied                            Lehrstuhl fuer Informatik II
 schmied_at_informatik.uni-wuerzburg.de        Universitaet Wuerzburg
 Tel. 0931 / 888-5852                       Am Hubland	
 Fax. 0931 / 888-4602                       D-97074 Wuerzburg
------------------------------------------------------------------------
Received on Mon Aug 01 1994 - 17:15:05 CEST

Original text of this message