Tool/s for checking declarations in Pro*C

From: Barry Arthur <arthurb_at_citec.com.au>
Date: Mon, 23 Jul 2001 01:17:49 GMT
Message-ID: <9jfu0d$7r31_at_inetbws1.citec.com.au>


Hello all,

I am looking for a tool to check the declarations in Pro*C against their counterparts in Oracle (I'm using 8.0.6).

For example, if I declare a char array-:   char c[10];
and then subsequently do a select into this array-:   EXEC SQL SELECT foo INTO :c FROM bar;
(excusing any possible typos/syntax probs, and assuming that this will only return a single row, and that foo is a string type...)

Then... as I understand it, if foo is longer than 9 characters, Pro*C will truncate the result, terminating my character array at c[9] with a nul byte *.

Stable and correct behaviour in this situation, yes, however I would like to be told that this truncation will / has occured.

Is there a tool that will help with this? Free would be great. I have tried the two sqlcheck options, syntactic and semantic, neither of which highlight this deficiency.

I did a quick search on the net and in this newsgroup, to no avail.

Any help would be much appreciated.

Cheers,

Barry Arthur.

  • I believe this is the behaviour when not using the CHARMAP=STRING option; I haven't tested this scenario with that option yet. The systems I'm looking at aren't using that option in all cases, and I'm reluctant to just go changing it all without understanding the consequences.
Received on Mon Jul 23 2001 - 03:17:49 CEST

Original text of this message