From: Zoran <zoranm@echo-on.net>
Subject: Why won't this 1 line pgm pre-compile with Pro-C on NT?
Date: 1998/03/03
Message-ID: <34FCBC5A.22EE2C2A@echo-on.net>#1/1
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=us-ascii
Organization: Echo Online Internet Inc.
Mime-Version: 1.0
Reply-To: zoranm@echo-on.net
Newsgroups: comp.databases.oracle.server



I'm trying to use the Pro-C precompiler for Oracle 8 on NT and it won't
pre-compile a simple 1 line pgm with just a connect statement.

It's complaining about an undefined identifier, but it is defined... why
won't it see it?

Here's my program:

#include <stdio.h>
#include <stdlib.h>
#include <sqlca.h>

main () {
    char username[10] = "SCOTT";
    char password[10] = "TIGER";

    EXEC SQL CONNECT :username IDENTIFIED BY :password;
}

This is what I get from the proc pre-compiler:


Pro*C/C++: Release 8.0.3.0.0 - Production on Tue Mar 3 21:17:40 1998

(c) Copyright 1997 Oracle Corporation.  All rights reserved.

System default option values taken from: C:\ORANT\pro80\pmscfg.cfg

Semantic error at line 9, column 23, file x.pc:
    EXEC SQL CONNECT :username IDENTIFIED BY :password;
......................1
PCC-S-02322, found undefined identifier
Semantic error at line 9, column 47, file x.pc:
    EXEC SQL CONNECT :username IDENTIFIED BY :password;
..............................................1
PCC-S-02322, found undefined identifier

Thanks in advance Zoran.


