Jump to content


Richard Bassett

Member Since 14 Mar 2000
Offline Last Active Oct 20 2014 02:03 PM
-----

Posts I've Made

In Topic: Variables being rounded in Full Function SQL

20 October 2014 - 02:00 PM

Hi Darren,

 

Actually, I think things are slightly subtler than that.  IIRC, ProIV documents that you cannot receive output values from full-function SQL into ProIV variables, it's officially *not* supported.  But, despite that, people commonly do this with numeric values and it mostly works (as you observed).

 

Past testing has strongly suggested to me that ProIV exchanges numeric values with Oracle in the form of binary floaing point numbers (i.e. C double type if you are familiar with that).  This means decimal places cannot be round-tripped completely accurately (the same reason people often ask of C/Java/etc.  why 0.1 + 0.2 is not equal to 0.3)

 

Consequently, the guidelines we adopted were that host variables should always be ProIV alpha variables but that it was acceptable when particularly advantageous, to use a :#var host variable to receive integer values, but nothing else.

 

 

> what it also does is change the value of #TEST from 318.01 to 318.00

 

Given what I recall above, I am a bit surprised by that - but I guess it's possible ProIV deliberately remove all the decimals because of these issues.  I would actually have expected only that the decimals might become slightly different due to the value being round-tripped in the binary floating point representation (e.g. 318.01 becomes 318.00999...)

 

(General caveat:  I never tested anything later than v5.5 in this respect)


In Topic: Glovia SuperLayer programmer looking for work...

28 March 2014 - 03:59 PM

Glenn,

 

Saw this today:

 

https://fujitsujobs....9644&src=JB-202

 

(unless that's where you're leaving of course :-" )


In Topic: Example of using dynamic SQL

25 February 2014 - 02:32 PM

Obligatory Little Bobby Tables reference:

 

https://xkcd.com/327/

 

The serious point to remember is that using dynamic SQL enables SQL injection attacks, so you should always put in place appropriate sanitization of the variable text you are splicing into your SQL, otherwise bad things can happen to good people.


In Topic: ProIV + Postgres = Extremely slow

06 January 2014 - 02:19 PM

Hi Mike,

 

I haven't used PostgreSQL with ProIV but I have extensive painful experience with other databases  :-"

 

Like you, it made absolutely no sense to me why a savepoint would be being created. I cannot see how that could be normal, indeed I cannot see any reason for it in any regular ProIV processing.  I have never seen that with Oracle or DB2.

 

I was about to suggest this might be an ODBC driver issue as neither Oracle nor DB2 use ODBC with ProIV, however.. I see you have already received an answer in the affirmative elsewhere viz:

 

http://postgresql.10...-td5782434.html

 

+1 to the PostgreSQL community :shifty:

 

Did that in fact fix most of your problem, it would be good to know?


In Topic: Produce PDF Documents Within PROIV Logic Using SSO (No XML & XSL)

07 February 2013 - 06:10 PM

Thanks Ross, that's very helpful.