From: <hm...@gm...> - 2005-02-23 16:40:22
|
> hm...@gm... wrote: > > > I am trying to find out during compile time whether the parameter/s of a > > given procedure is/are input, output or input/output... > > Just call SQLProcedureColumns, which returns a result set describing the > procedure arguments. The 5th column is COLUMN_TYPE, which can be one of > SQL_PARAM_INPUT, SQL_PARAM_OUTPUT, etc. You can then SQLBindParameter > appropriately. > Thanks a lot, this has been the problem I am facing. After connecting successfully, I did the following: rc = SQLNumParams(hstmt,&numCols); rc = SQLProcedureColumns(hstmt,NULL,0,(unsigned char*) colSchemaNamePattern,len, (unsigned char *)"test3",SQL_NTS,(char *) colNamePattern,len); My rc remains 0 after the call of SQLProcedureColumns, but the colSchemaNamePattern is 0 (????) so also colNamePattern. It is difficult for me make an assertion. I cannot say for sure if everything went well. How can I prove this? Is sth. missing in the sequence? I have also tried with SQLPrepare before calling SQLProcedureColumns, but to no avail. Also, how do I parse the arguments, with SQLFetch(hstmt)? Thanks and regards, Harp -- Lassen Sie Ihren Gedanken freien Lauf... z.B. per FreeSMS GMX bietet bis zu 100 FreeSMS/Monat: http://www.gmx.net/de/go/mail |