Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> "Bus Error" while running OCI programs

"Bus Error" while running OCI programs

From: <rohit_at_techapp.com>
Date: 1997/11/03
Message-ID: <878593721.19809@dejanews.com>#1/1

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..



#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include "oratypes.h"

/* 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);

    }
 printf("\nDisconnected from database\n"); }

Thanks a ton in advance

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet
Received on Mon Nov 03 1997 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US