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 -> How do you declare function parameters as host variables in Pro*C/C++?

How do you declare function parameters as host variables in Pro*C/C++?

From: Erik Moe <emoe_at_mmcable.com>
Date: Wed, 01 Sep 1999 00:18:45 GMT
Message-ID: <37cc67c9.1750937@news-server>


Hello,

I haven't done embedded SQL in several years and then it was with Informix. I want to use some function parameters as host variables, something like this:

func(int foo, char* bar)
{

   EXEC SQL INSERT INTO FOOBAR (FOO, BAR) VALUES (:foo, :bar); }

How do I declare foo and bar as host variables? I don't want to want to you K&R syntax:

func(foo, bar)
EXEC SQL BEGIN DECLARE SECTION
int foo;
char* bar;
EXEC SQL END DECLARE SECTION
{

   EXEC SQL INSERT INTO FOOBAR (FOO, BAR) VALUES (:foo, :bar); }

Is this legal?

func(
EXEC SQL BEGIN DECLARE SECTION
int foo, char* bar
EXEC SQL END DECLARE SECTION
)
{

   EXEC SQL INSERT INTO FOOBAR (FOO, BAR) VALUES (:foo, :bar); }

Erik Moe Received on Tue Aug 31 1999 - 19:18:45 CDT

Original text of this message

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