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 -> PRO*C Unknown # of variables, Unknown Types

PRO*C Unknown # of variables, Unknown Types

From: Clayton M. Arends <nospam_carends_at_evisions.com>
Date: Tue, 07 Mar 2000 17:24:26 GMT
Message-ID: <eXax4.1041$d5.12411@typhoon1.san.rr.com>


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,

Received on Tue Mar 07 2000 - 11:24:26 CST

Original text of this message

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