Re: pro*c

From: sac <>
Date: 11 Jan 2006 11:46:32 -0800
Message-ID: <>

[Quoted] i am using pro*c version on 9 on winxp...

i saved the below program as a .pc file and in pro*c ran was converted to .c file ....i compiled that .c file in vc++ ...first of all it showed the error that sqlca.h not found, so copied that file from oracle_home\precomp\ c:\program files\microsoft visual studio\vc98\ it woked fine..then it somehow compiled fine and then i tried to build that file to make an .exe of that it showed 3 errors:

error lnk 2001: unresolved external symbol really_complex_calculation()..
error lnk 2001: unresolved external symbol sqlerror_hard() error lnk 2001: unresolved external symbol sql_ctx()

pLEASE GUIDE HOW TO RESOLVE THIS.. am i doing everything correctly..

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

main( argc, argv )
int argc;
char * argv[];
varchar oracleid[31];
int x;
EXEC SQL END DECLARE SECTION;     strcpy( oracleid.arr, "scott/tiger_at_foo" );     oracleid.len = strlen(oracleid.arr);

    EXEC SQL WHENEVER SQLERROR DO sqlerror_hard();     EXEC SQL CONNECT :oracleid;
    printf("\nConnected to ORACLE as user: %s\n\n", oracleid.arr);

    x = really_complex_calculation();

    exec sql insert into xx ( x ) values ( :x );

    /* Disconnect from ORACLE. */


Volker Hetzer wrote:

> sac wrote:
> > Hi all,
> >
> > i have a simple pro*c program(i have pro*c installed , oracle ver 9,
> > dont have c application installed)..could anyone tell me how to run
> > i can run that in pro*c which show green check mark in front
> > of it ..NOW WHAT TO DO AFTER THAT ..I DONT KNOW ...please help
> Please ask yourself whether it's really worth the bother to
> use pro*c in a C/C++ applicaiton on windows. And if the answer is simply
> "what else is there" then don't.
> Oracle has a nice ActiveX control that can be used from any number of
> programming or scripting languages, including C/C++/VB/VBScript/JScript/Perl/Tcl
> and whatever else is there. It's fast too, apart from object management, but
> I very much doubt that pro*c can help you there either.
> Also what is a "c application"?
> And who is responsible for your oracle database? Your DBA could probably
> help you too.
> Lots of Greetings!
> Volker
Received on Wed Jan 11 2006 - 20:46:32 CET

Original text of this message