I have a program like this (for the Pro * C precompiler):
#include <stdio.h> #include <stdlib.h> #include <sys/wait.h> #include <errno.h> EXEC SQL BEGIN DECLARE SECTION; static VARCHAR ora_connect_str[81]; EXEC SQL END DECLARE SECTION; EXEC SQL INCLUDE SQLCA; int main() { FILE *f; int rc = 1; char *eptr=getenv("DB_LOGIN"); strcpy(ora_connect_str.arr, eptr); ora_connect_str.len = strlen(eptr); EXEC SQL CONNECT :ora_connect_str; f=popen("exit 0", "r"); rc = pclose(f); printf("errno=%d rc=%d\n", errno, rc); }
When I use tcp / ip connection with oracle, it works fine. But when I use BEQ, pclose () returns -1 with errno 10. Can someone direct me to the document (s) describing possible problems with BEQ connections? It seems that somewhere inside the inlay of the oracle there is a wait () call already ...
user332325
source share