Xref: alice comp.databases.oracle.tools:24391
Path: alice!news-feed.fnsi.net!netnews.com!news-peer1.sprintlink.net!news-in-west1.sprintlink.net!news.sprintlink.net!news.rscs.net!not-for-mail
From: "Eugene Katzman" <e.katzman@stanleyassoc.com>
Newsgroups: comp.databases.oracle.tools
Subject: Using Perl to connect with Oracle Database
Date: 5 May 1999 21:44:24 GMT
Organization: Rocket Science Computer Service, Inc.
Lines: 29
Message-ID: <01be9740$4d87d040$987769ce@katzmae>
X-Newsreader: Microsoft Internet News 4.70.1155

Hi
	I just completed writing a C program for compiling with the ProC
precompiler. 
Now I find that I can no longer access the Precompiler.  I need to write
the same program in Perl.  
	What I need to know is what I have to post as #include or use ie use
ORALIB
the other thing I need to know is what has to preceed the SQL like 
EXEC SQL 
or 
SQLPLUS and how do I get the Oracle statements to execute out of the
program to wherever it needs to go and how to run the connect operation.  

With Pro C I use EXEC SQL begin declare section;
			varchar userid[10], password[15];
		EXEC SQL end declare section;
after some logic to obtain userid and passwd, 
		EXEC SQL connect :userid identified by :password;
		if (sqla.sqlcode != 0)
			fprintf(stderr, "Failed");
etc
How is it done in Perl, do you use the sqlca structure for returning
values.  How does one get data returned from a select statement, ie
	EXEC SQL select idnum into :peridnum from table1 where columnb equals
tempvalue;

Thanks a lot

Gene  Katzman e.katzman@stanleyassoc.com (703)739-8559
