func (stmt *Statement) NumFields() (int, *ODBCError) { var NOC C.SQLSMALLINT ret := C.SQLNumResultCols(C.SQLHSTMT(stmt.handle), &NOC) if !Success(ret) { err := FormatError(C.SQL_HANDLE_STMT, stmt.handle) return -1, err } return int(NOC), nil }
func SQLNumResultCols(statementHandle SQLHSTMT, columnCountPtr *SQLSMALLINT) (ret SQLRETURN) { r := C.SQLNumResultCols(C.SQLHSTMT(statementHandle), (*C.SQLSMALLINT)(columnCountPtr)) return SQLRETURN(r) }