proC function prototype bug

From: Rob E. Allan <rallan_at_ohgpu.hydro.on.ca>
Date: 1995/06/02
Message-ID: <1995Jun2.163506.6953_at_ohgpu.hydro.on.ca>#1/1


I am starting to program some stuff using ProC v2.0.4.0.0 against a V7.14 database. I found an annoying bug and I was wondering if there is a bug fix for it.

Here's the bug:

If I have a function:

int oraConnect(const char uid[50], const char pwd[50])

And it does:

EXEC SQL CONNECT :uid IDENTIFIED BY :pwd;

It always returns an error. If I change the function prototype from char[50] to char*, everything works. It seems that the precompiler doesn't pick up the "50", it sets:

sqlstm.sqhstl[1] = (unsigned int )1

instead of:

sqlstm.sqhstl[1] = (unsigned int )50

If I define a char[50] array within the function, it works fine.

rob allan rob.e.allan_at_hydro.on.ca Received on Fri Jun 02 1995 - 00:00:00 CEST

Original text of this message