Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!umich!ox.com!math.fu-berlin.de!unidui!unido!ztivax!ap542!news From: geissler@D012S050@ap542.uucp (Norbert Geissler) Newsgroups: comp.databases Subject: ESQL/C in ORACLE: bug ?? Message-ID: <1991Apr29.153133.9717@ap542.uucp> Date: 29 Apr 91 15:31:33 GMT Sender: news@ap542.uucp (News Admin) Organization: SNI AP 154 Lines: 54 We use an UNIX V.2 derivate called SINIX 5.22 and a NSC 32532 machine (MX300). Using PRO*C V1.3.15.1.2 with ORACLE V6.0.31 we get an interesting problem: If we declare the parameter of a C-function as ESQL/C hostvariable, the precompiler generates code which is not compilable with our C-Compiler due to generation of illegal static declarations in C. Example: ESQL/C C generated by precompiler prsqlca(s,sqlca) prsqlca(s,sqlca) EXEC SQL BEGIN DECLARE SECTION; /* SQL stmt #3 char *s; EXEC SQL BEGIN DECLARE SECTION; EXEC SQL END DECLARE SECTION; */ struct sqlca *sqlca; char *s; { /* SQL stmt #4 /* body */ EXEC SQL END DECLARE SECTION; } */ static int SQLTM[8]; static int sqlusi[1] = { 0}; static int SQLBT0 = 1; static int SQLBT1 = 2; static int SQLBT2 = 4; static int SQLBT3 = 9; static unsigned long sqlvsn = 10315; static int IAPSUCC = 0; static int IAPFAIL = 1403; static int IAPFTL = 535; extern void sqliem(); struct sqlca *sqlca; { /* body */ } Our ORACLE hotline can't answer our questions, so we ask you: 1) Is it possible to declare a parameter of a C-function as ESQL/C hostvariable in PRO*C ? (ESQL/C from other DBMS allows it !) 2) The precompiler creates a lot of static declarations there. What are they for ? 3) Is this a bug ?? Thanks in advance ! --- Norbert Geissler, SIEMENS-NIXDORF AG, SNI AP 154, Munich, Germany UUCP: geissler@ap542.uucp INTERNET: geissler%ap542@ztivax.siemens.com ..for chess, that superb, cold, infinitely satisfying anodyne to life, I feel the ardour of a lover, the humility of a disciple. (Herbert Russel Wakefield)