Re: esql core dumped !
Posted in 2003
"Abhishek Mathur" <abhishek@us.ibm.com> a 'crit dans le message de news: biijeq$hqi$1@terabinaries.xmission.com... > > Hi , > Guess, the picture is clear now. First thing, you are right - > ESQL/C does NOT recommend the use of $ include or EXEC SQL include <*.h> > within the BEGIN/END declare section. Only because, it works with some > ESQL/C version on some platforms, does not warranty it to work > everywhere.. The ESQL/C programmer's manual also does not recommend the > use of such syntax. I agree with that. My support don't ... they says that if it work with the windows version , it will work the same on the AIX one. So i have to wait the 1.81 for AIX > I can only suggest one thing - if you MUST, and have to use the > $include files, try moving them out of the BEGIN/END DECLARE section, and > then try to compile the application. It should work better , and should > not report any errors. Something like this -- > #include <stdio.h> > #include <time.h> > #include <string.h> > #include <stdlib.h> > > exec sql include "tab_one.h"; > exec sql include "tab_two.h"; OK for this , but i need to use string declarations: struct dohelp_ { long num_help; string id_help[33]; /* is a vachar */ string txt_help[260]; /* is a varchar */ }dohelp; If i declare it as varchar. When i get info from the database with an esql query: select txt_help into :dohelp.help from dohelp. The dohelp.help variable is fill with the value and trailing blank until lenght = 33 => "value " If i decalre it as string it work .. But it work too much !!!! if my string is "gcc -o " the last blank is removed too when querying the database !!!! If somebody know how to do so !! I would be really happy to know how :) > The problem may not be with the ESQL/C file, but infact with the > header files that are being included. And by this I only mean, that the > header file has some C specific syntaxes, and when you try to include that > header file withing the BEGIN/END DECLARE SECTION, what we are trying to > do here is mixing up the C specific with the ESQL/C specific, and which > may confuse the compiler (to the extent that it may core dump). I > seriously recommend that you remove the header files out of the BEGIN/ END > declare section, and recompile the applications. I 've tried => It's no much success. ... Bur i wtill have so way to explore... > We have ahd such cases reported earlier too, and have asked > customers to try the same solution, and has worked for them. Well ... i think i gonna look deeper in the code to be sure :) > Try this, and hopefully it will work! I'm gonna try one more time ! thx again :)