Re: How to select column name in Pro C at run-time

From: Nilo Segura <nilo_at_orion.cern.ch>
Date: Wed, 17 Mar 1993 08:33:13 GMT
Message-ID: <1993Mar17.083313.14041_at_dxcern.cern.ch>


In article <1993Mar16.204157.1790_at_umr.edu>, jybarnes_at_cs.umr.edu (Jym Barnes) writes:
> Hi,
>
> I have a need to do something I have never done before in
> Pro C. I want to specify at runtime what column name I
> want to use in a SELECT statement. Usually the column names
> in a Pro C statement are hard-coded well I want to make the
> the column name selectable at runtime. Is it possible? If
> it is possible if someone could send me an example I would
> appreciate it. Please send replies to jybarnes_at_next5.cs.umr.edu.
>
> Thanks,
>
> Jym Barnes

Hi!

 You can use Pro*C, with the so-called dynamic sql statements ( method 4 as it is issued in the doc, it is the most general method ).

 The SQL statement must be built via the usual functions read, concatenate etc etc...

 it is pretty easy, and you can just follow the steps described in the doc to perform your wishes.

   go for it !  

 Hope this will help.

  Nilo. Received on Wed Mar 17 1993 - 09:33:13 CET

Original text of this message