I am returning a resultset from an Informix Stored Procedure to VB6 via ODBC and ADO. Is there any way of returning the field names? At this point I get the resultset, but the name property of the fields are blank.
I’m not an ODBC programmer, but I’m pretty sure that the ODBC standard includes a way to get the field names (may be referred to as “headers”) back from the database. You can probably get to this from VB.
On the other hand, since you’re trying to get these field names from a stored procedure, you probably don’t have a simple table to select from. In this case you may try something from SQL along the lines of:
SELECT fname as firstname from TABLENAME
Depending upon how you’re building your stored procedures, the above syntax may be helpful.