Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> PRO*C Unknown # of variables, Unknown Types
All,
I am relatively new to Pro*C. I am used to accessing databases using Windows-based programs where I can create SQL statements on the fly and populate the results into an unknown number of variables where each variable is an unknown type. Then using Variant types I can perform several different manipulations on the data of my choice.
My problem: I have an application (Windows, client-side) that allows the user to create a SELECT statement placing the results into a certain number of variables. For testing purposes on the client-side this works fine because I can create an array of Variants to place the results in. However, on the server-side I have a Pro*C written application that needs to perform similar functionality. It needs to be able to execute a SQL statement (that was unknown at compile-time) and place the results into an array of "variant" types. I say variant in this context meaning unknown at compile time.
My questions: How do I create a statement in Pro*C or direct sqlxxx functions that is capable of using a (char*) variable as the statement? Then, how do I inform the database functions to populate variables in which I have no clue what the type is?
Looking at the .C files generated after the pre-compiler stage I can see the structures used for this process. It appears that I can do something similar by directly manipulating these structures. I just need a little direction and to be assured that this can be done before proceeding.
Any help is appreciated. If you email me be sure to remove the "no_spam" from my email address.
Thank you,
![]() |
![]() |