Hi all,

I am developing a VB application which connects to a OS/390 DB2 server (through DB2 Connect) using the IBM OLEDB Provider and calls a stored procedure coded in COBOL. The stored procedure just opens and returns a cursor.

Everything seems to be working just fine except one thing. The corresponding ADODB.Recordset does not have names in the Field object of its Fields collection. The names of the Field(s) are just the position in which they appear in the COBOL cursor. For example, for the cursor: ... SELECT COL1, COL2 FROM TABLEA ... I get he following: rsData.Fields(0).Name = "1" and rsData.Fields(2).Name = "2" instead of "COL1" and "COL2" respectively.

If I execute the same query as a direct SQL statement (dynamic SQL) instead of calling the stored procedures the Field names are assigned just fine.

I would really appreciate if anyone has any suggestion. Thanks,