Q: How to specify column names returned in spl?
Posted in 1999
Topics: Stored Procedures & SPL
Hi all, I'm wondering if there is any way to specify the column names returned from an Informix stored procedure. I am converting some procedures from SQL Server and the vb applications using them need this to specify the column name they are referring to. The only workarounds I have found are to identify the column by ordinal position in vb, or to use an informix view. In some cases neither of these options are suitable. I don't think there is a was to do this, but I'm also interested in any other workarounds people have used. TIA, Kelly
Kelly Ringwald wrote: > > Hi all, > > I'm wondering if there is any way to specify the column names returned > from an Informix stored procedure. I am converting some procedures > from SQL Server and the vb applications using them need this to > specify the column name they are referring to. > > The only workarounds I have found are to identify the column by > ordinal position in vb, or to use an informix view. In some cases > neither of these options are suitable. > > I don't think there is a was to do this, but I'm also interested in > any other workarounds people have used. No way directly. You could have the stored procedure load its output into a temp table and then query the temp table using its column names. Art S. Kagel
My workaround (read: "ugly hack") that I used to use was to return the column names WITH RESUME as the first step of the SP. Of course, this assumes that all of your returned columns are type CHAR, so it's seldom practical to do it this way. Kelly Ringwald wrote in message <369dc9b7.14524813@news.pacbell.net>... >Hi all, > >I'm wondering if there is any way to specify the column names returned >from an Informix stored procedure. I am converting some procedures >from SQL Server and the vb applications using them need this to >specify the column name they are referring to. > >The only workarounds I have found are to identify the column by >ordinal position in vb, or to use an informix view. In some cases >neither of these options are suitable. > >I don't think there is a was to do this, but I'm also interested in >any other workarounds people have used. > >TIA, >Kelly