Help with ESQL Error -33037
Posted in 2000
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
We are experiencing Error -33037 with the following esql/c code. i.h file EXEC SQL BEGIN DECLARE SECTION; struct bus_rules { short acct_plen; /* Account padded length. */ }; EXEC SQL END DECLARE SECTION; i.c file EXEC SQL include "i.h"; . . . void get_busi_rules( bus_rptr ) EXEC SQL BEGIN DECLARE SECTION; PARAMETER struct bus_rules * bus_rptr; EXEC SQL END DECLARE SECTION; { EXEC SQL select acct_plen into :bus_rptr->acct_plen from busi_rules where client_id = :parse_results.org_id; Above line generates the following error: Error -33037: 'acct_plen' is not a component of record 'bus_rptr'. Any help would be greatly appreciated. We are desperate to resolve this. Thanks; Dave Berk davidberk@home.com
This is not much help, I'm afraid, but... I've inadvertently created that error in the past by having a duplicate structure name in another include file. Also make sure your i.h file is the one being found by the compiler. My co-worker here is experiencing the same thing. Using CVS, we are both working on the same program; mine compiles fine, his blows up with a string of errors exectly like yours. Our .h files both clearly declare the "missing" fields. He's still trying to figure it out. All I can suggest to him is to remove everything and start over with cvs checkout. -- Bill Converse "David Berk" <davidberk@home.com> wrote in message news:3940DD25.C549E2AC@home.com... > We are experiencing Error -33037 with the following esql/c code. > > i.h file > > EXEC SQL BEGIN DECLARE SECTION; > > struct bus_rules > { > short acct_plen; /* Account padded length. */ > }; > > EXEC SQL END DECLARE SECTION; > > > i.c file > > EXEC SQL include "i.h"; > > . > . > . > void > get_busi_rules( bus_rptr ) > > EXEC SQL BEGIN DECLARE SECTION; > > PARAMETER struct bus_rules * bus_rptr; > > EXEC SQL END DECLARE SECTION; > > { > EXEC SQL select acct_plen into :bus_rptr->acct_plen > from busi_rules where client_id = :parse_results.org_id; > > Above line generates the following error: > Error -33037: 'acct_plen' is not a component of record 'bus_rptr'. > > Any help would be greatly appreciated. We are desperate to resolve > this. > > > Thanks; > > Dave Berk > davidberk@home.com > > >
What version of ESQL/C are you using? Art S. Kagel David Berk wrote: > > We are experiencing Error -33037 with the following esql/c code. > > i.h file > > EXEC SQL BEGIN DECLARE SECTION; > > struct bus_rules > { > short acct_plen; /* Account padded length. */ > }; > > EXEC SQL END DECLARE SECTION; > > i.c file > > EXEC SQL include "i.h"; > > . > . > . > void > get_busi_rules( bus_rptr ) > > EXEC SQL BEGIN DECLARE SECTION; > > PARAMETER struct bus_rules * bus_rptr; > > EXEC SQL END DECLARE SECTION; > > { > EXEC SQL select acct_plen into :bus_rptr->acct_plen > from busi_rules where client_id = :parse_results.org_id; > > Above line generates the following error: > Error -33037: 'acct_plen' is not a component of record 'bus_rptr'. > > Any help would be greatly appreciated. We are desperate to resolve > this. > > Thanks; > > Dave Berk > davidberk@home.com
"Art S. Kagel" wrote: > What version of ESQL/C are you using? > 7.23 > > Art S. Kagel > > David Berk wrote: > > > > We are experiencing Error -33037 with the following esql/c code. > > > > i.h file > > > > EXEC SQL BEGIN DECLARE SECTION; > > > > struct bus_rules > > { > > short acct_plen; /* Account padded length. */ > > }; > > > > EXEC SQL END DECLARE SECTION; > > > > i.c file > > > > EXEC SQL include "i.h"; > > > > . > > . > > . > > void > > get_busi_rules( bus_rptr ) > > > > EXEC SQL BEGIN DECLARE SECTION; > > > > PARAMETER struct bus_rules * bus_rptr; > > > > EXEC SQL END DECLARE SECTION; > > > > { > > EXEC SQL select acct_plen into :bus_rptr->acct_plen > > from busi_rules where client_id = :parse_results.org_id; > > > > Above line generates the following error: > > Error -33037: 'acct_plen' is not a component of record 'bus_rptr'. > > > > Any help would be greatly appreciated. We are desperate to resolve > > this. > > > > Thanks; > > > > Dave Berk > > davidberk@home.com
"Art S. Kagel" wrote: > What version of ESQL/C are you using? > 7.23 > > Art S. Kagel > > David Berk wrote: > > > > We are experiencing Error -33037 with the following esql/c code. > > > > i.h file > > > > EXEC SQL BEGIN DECLARE SECTION; > > > > struct bus_rules > > { > > short acct_plen; /* Account padded length. */ > > }; > > > > EXEC SQL END DECLARE SECTION; > > > > i.c file > > > > EXEC SQL include "i.h"; > > > > . > > . > > . > > void > > get_busi_rules( bus_rptr ) > > > > EXEC SQL BEGIN DECLARE SECTION; > > > > PARAMETER struct bus_rules * bus_rptr; > > > > EXEC SQL END DECLARE SECTION; > > > > { > > EXEC SQL select acct_plen into :bus_rptr->acct_plen > > from busi_rules where client_id = :parse_results.org_id; > > > > Above line generates the following error: > > Error -33037: 'acct_plen' is not a component of record 'bus_rptr'. > > > > Any help would be greatly appreciated. We are desperate to resolve > > this. > > > > Thanks; > > > > Dave Berk > > davidberk@home.com
I tried to post a response to this earlier but it never arrived, though a later one on a different thread did... And now that Art Kagel is on the case, your problems are nearly over... :-) My suggestions were to check that that struct wasn't being redefined elsewhere, and that the compiler can find your include file. Also, try defining the field as 'int' instead of short... Just stabs in the dark, though. A co-worker here started getting that error inexplicably and we finally fixed it by erasing all his source code and checking it out again (using CVS). Maybe he had trashed his makefile somehow... Lotta help, I know. -- Bill Converse "David Berk" <davidberk@home.com> wrote in message news:3940DD25.C549E2AC@home.com... > We are experiencing Error -33037 with the following esql/c code. > > i.h file > > EXEC SQL BEGIN DECLARE SECTION; > > struct bus_rules > { > short acct_plen; /* Account padded length. */ > }; > > EXEC SQL END DECLARE SECTION; > > > i.c file > > EXEC SQL include "i.h"; > > . > . > . > void > get_busi_rules( bus_rptr ) > > EXEC SQL BEGIN DECLARE SECTION; > > PARAMETER struct bus_rules * bus_rptr; > > EXEC SQL END DECLARE SECTION; > > { > EXEC SQL select acct_plen into :bus_rptr->acct_plen > from busi_rules where client_id = :parse_results.org_id; > > Above line generates the following error: > Error -33037: 'acct_plen' is not a component of record 'bus_rptr'. > > Any help would be greatly appreciated. We are desperate to resolve > this. > > > Thanks; > > Dave Berk > davidberk@home.com > > >