Re: dynamically called a stored procedure from proC?

From: Jim <jimmorgan_at_csi.com>
Date: 1998/03/12
Message-ID: <#g1ykFiT9GA.275_at_ntawwabp.compuserve.com>#1/1


You may be hosed. There are some calls that Oracle does not allow host variables to be used (this may be true on all other RDBMS systems, for all I know). I am not sure about your particular instance, but I do know that if you want to force your program to use a particular rollback segment, you have to hardcode the name of the rollback segment in your BEGIN TRANS call. I can just trap the 'rollback segment doesn't exist' error and my code will be safe...you don't have an option like that with what you're doing.

Resorting to modifying the generated code? Yuk, I sure hope you don't have to do that. There's got to be a better way...

Is using the Oracle CLI an option for you? I haven't used it, but it may offer some additional flexibility when you need to do things dynamically. Good luck, hope someone else can help you more.

--
Regards,
Jim

Jack Tolson wrote in message <35084767.B6CC0B13_at_netcom.com>...

|Is there a way to dynamically called a stored procedure from
|proC? I know that you can call a dynamic sql statement.
|You can get a desciptor and build the statement. However,
|it seems that you have to create a sql block. Meaning that
|you have to define a block, something like this example:
|
| exec sql;
| begin
| stored procedure;
| end;
|
|This works but the stored procedure must be hardcoded
|between the block. I precompiled the code and it seems
|that the code that is generated is a string that is pass
|to another oracle function. I there a way that I can create
|this string on the fly. I could write something to modify
|the generated code but this seems to me to be a maintenance
|nightmare. So, is there a way to do this through proC.
|
|I also tried:
| exe = "execute stored proc";
| EXEC SQL :exe;
|The precompiler did not like this statement;
|
|P.S. Also, can I call a function that returns a value.
|
Received on Thu Mar 12 1998 - 00:00:00 CET

Original text of this message