proc vs float
From: Rob E. Allan <Rob.E.Allan_at_hydro.on.ca>
Date: Wed, 21 Jul 1993 19:52:10 GMT
Message-ID: <1993Jul21.195210.23473_at_ohgpu.hydro.on.ca>
EXEC SQL BEGIN DECLARE SECTION;
float tflo; /* dummy float */
EXEC SQL END DECLARE SECTION; main()
{
Date: Wed, 21 Jul 1993 19:52:10 GMT
Message-ID: <1993Jul21.195210.23473_at_ohgpu.hydro.on.ca>
EXEC SQL BEGIN DECLARE SECTION;
float tflo; /* dummy float */
EXEC SQL END DECLARE SECTION; main()
{
tflo=10.0;
EXEC SQL UPDATE JUNK SET F_VALUE = :tflo
WHERE ID = 'AA3';
}
F_VALUE is set as: NUMBER(6,1).
I seem to have no problems reading an F_VALUE into :tflo. But whenever I try to put tflo into F_VALUE, I get a segmentation fault. Using a debugger, I have followed the program to :
sqlcex(&sqlctx, &sqlstm, &sqlfpn);
And up to this point, tflo seems to be ok. (i.e. it is still 10.0).
Further complicating this is that if I declare tflo to be an int, the program works fine. In fact, anything I have previously done with VARCHARs and ints has worked great.
rob allan email:rob.e.allan_at_hydro.on.ca Received on Wed Jul 21 1993 - 21:52:10 CEST