we have a list of variables that users can select. These vars will be
columns in the dataset the user wants to see. We can easily create a
with this information that holds the select statement needed to get
The big problem is that the columns in the select statement are not
constant. A column that is the third column in one query can be the
the tenth column in the next query... simply because the user selected
variable he wants to see...
When you have to create a cursor with this information you get into
because you have to know the column names of the columns in your
string plus the local variables in which to store the information
cursor loop... basically it is a different cursor every time !!!!!!
The only solution I could think of was to parse this select string
information we have) into a number of flag variables (true for a
column and false for an unselectd one). You could then do a number of
if-then's to run through al the possible columns and create a cursor
only if the column was selected by the user. During the cursor loop
could use these flags again when you're printing the columns to the
If somebody can point out the error of my reasoning and solve the
much easier, I will be most happy !
9736 RV Groningen