Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> "Bus Error" while running OCI programs
Hi,
I am facing a strange problem ..I'm trying to compile an OCI program using gcc. When I try to run it ..is executes all the calls (at least appears to ..) but exits with a 'Bus Error' message ..
Has anybody else faced this problem before. I'd greatly appreciate any help..
I'm attaching the src for the small program I'm trying to run..
/* LDA and CDA struct declarations */
#include <ocidfn.h>
#ifndef __STDC__
#include <ociapr.h>
#else
#include <ocikpr.h>
#endif
/* demo constants and structs */
#include "ocidem.h"
/* oparse flags */
#define DEFER_PARSE 1
#define NATIVE 1
#define VERSION_7 2
char sql_statement[80] = "SELECT last_name, first_name, user_id FROM
Customers";
/* Define a LDA, a HDA, and a cursor */
Lda_Def lda;
ub4 hda[HDA_SIZE/4];
main()
{
memset(hda,'\0',HDA_SIZE);
/* Connect to ORACLE and open the cursor */ printf("Starting program \n"); fflush(stdout);
if (olog(&lda, hda, "IPAC", -1, "IPAC", -1,(text *) 0, -1, OCI_LM_DEF)) { printf("\nError: Unable to connect to ORACLE\n"); fflush(stdout); exit(1); } printf("\nConnected to ORACLE \n"); fflush(stdout);
if (ologof(&lda))
{
printf("\nError : Error on disconnect\n"); exit(1);
Thanks a ton in advance
-------------------==== Posted via Deja News ====----------------------- http://www.dejanews.com/ Search, Read, Post to UsenetReceived on Mon Nov 03 1997 - 00:00:00 CST