Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> How do you declare function parameters as host variables in Pro*C/C++?
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