Thanks - wonderful. I also use these additional api calls:
SQLDescribeParam
SQLForeignKeys
SQLParamData
SQLGetStmtOption
SQLGetTypeInfo
And these constants:
SQL_API_ALL_FUNCTIONS = 0;
SQL_API_ODBC3_ALL_FUNCTIONS = 999;
SQL_IGNORE = (-6);
SQL_ATTR_QUERY_TIMEOUT = SQL_QUERY_TIMEOUT;
SQL_LEN_DATA_AT_EXEC_OFFSET = (-100);
SQL_DIAG_CURSOR_ROW_COUNT = (-1249);
SQL_NEED_LONG_DATA_LEN = 111;
SQL_NAMED = 0;
SQL_UNNAMED = 1;
SQL_ATTR_PARAMSET_SIZE = 22;
SQL_API_SQLPARAMDATA = 48;
SQL_PC_UNKNOWN = 0;
SQL_PC_NON_PSEUDO = 1;
SQL_PC_PSEUDO = 2;
SQL_ALL_TABLE_TYPES = '%';
though I'm really not sure that the use my codes make of SQL_LEN_DATA_AT_EXEC_OFFSET make any sense (it works, though, so I'm not breaking it)
I've attached the code I'm presently using, though I haven't tested it enough yet.