Urgent help for Pro*C.

From: Abhimanyu Parasher <aparashe_at_yallara.cs.rmit.edu.au>
Date: 25 Apr 1999 15:56:45 GMT
Message-ID: <7fvdvt$ibg$1_at_emu.cs.rmit.edu.au>



Hi!

    Thanks everybody for answering my posting. I'm facing another problem. This time it is Pro*C. The code I've written compiles fine with proc compiler, but, when it comes to compiling the .c file produced, it gives me an error of undefined symbol sqlcxt. The code is given below. I don't know which header file to use to remove this symbol. Please help me. I need it very urgently.

Thanks

Abhimanyu Parasher
#include <stdio.h>

EXEC SQL BEGIN DECLARE SECTION;
    int acct, amount, Choice;
    VARCHAR tran_type[10];
    VARCHAR status[65];
    VARCHAR uid[20];
    VARCHAR pwd[20];
EXEC SQL END DECLARE SECTION;

EXEC SQL INCLUDE SQLCA;
EXEC SQL INCLUDE SQLDA;
EXEC SQL INCLUDE ORACA;

main()
{

    strcpy (uid.arr,"aparashe");
    uid.len=strlen(uid.arr);
    strcpy (pwd.arr,"manshu212");
    pwd.len=strlen(pwd.arr);

    printf("\n\n\tEmbedded PL/SQL Demo\n\n");     printf("Trying to connect...");

    EXEC SQL CONNECT :uid IDENTIFIED BY :pwd;     printf(" connected.\n");
    for (;;) /* Loop infinitely */
    {

        printf("**************************************");
        printf("*   1.  Edit Student Data            *");
        printf("*   1.  Edit Subjects Data            *");
        printf("*   1.  Edit Courses Data            *");
        printf("*   1.  Edit Enrolment Data            *");
        printf("**************************************");
        printf("    Enter Choice : ");
        scanf("%d", Choice);
        if(Choice == 0)
        {
            EXEC SQL COMMIT WORK RELEASE;
            exit(0);
        }

        EXEC SQL EXECUTE

        BEGIN
            IF :Choice = 1 THEN
               :status := 'gone in';
            END IF;
        END;
        END-EXEC;
        status.arr[status.len] = '\0';
        printf("Status = %s", status.arr);

    }
}

-- 
                                                
                    
 
Received on Sun Apr 25 1999 - 17:56:45 CEST

Original text of this message