Re: refering to a variable column
From: Gary Myers <101355.3556_at_CompuServe.COM>
Date: 1995/12/04
Message-ID: <49via2$58n$1_at_mhafm.production.compuserve.com>#1/1
Date: 1995/12/04
Message-ID: <49via2$58n$1_at_mhafm.production.compuserve.com>#1/1
Yes, it is possible to access variable column names through Pro*C. The easiest
method is to use dynamic SQL to define the cursor. If the number of columns
returned is fixed, then it's fairly easy to define the cursor dynamically and
do the fetch as normal. If the number of columns is variable you can either
cheat (by selecting a number of dummy columns up to a theoretical or practical
maximum) or indulge in some much more complicated dynamic SQL.
This is covered in the Pro*C supplement. I don't have access to that myself
(only the Pro*Cobol version). However I can probably give some more detailed
instructions if required.
Gary
-- Gary Myers, Analyst/Programmer, Kaisha Technology, West of EnglandReceived on Mon Dec 04 1995 - 00:00:00 CET