
Problems using sqlaldt, dynamic SQL
Quote:
>Hi,
>I'm running Oracle8 on Linux (Intel) and I have to biuld dynamic Queries
>in C using Dynamic SQL. So I want to allocate memory for with the
>SQLDA-Structure with sqlalt.
>In the Oracle HTML-Docu sqlalt has 3 parameters:
>descriptor_name = sqlaldt(max_vars, max_name, max_ind_name);
>This didn't work. So i had a look at "sqlda.h" and found the following
>#define with 4
>parameters for sqlalt
>#define SQLSQLDAAlloc(arg1, arg2, arg3, arg4) sqlaldt(arg1, arg2, arg3,
>arg4)
>Does anybody know the meaning of the 4 Parameters. I think arg2 could be
>"max_vars".
Check out Chapter 14, Using Dynamic SQL: Advanced Concepts of the Pro
C/C++ Precompilers Guide.
descriptor_name = SQLSQLDAAlloc (runtime_context, max_vars, max_name,
max_ind_name);
where:
runtime_context - pointer to runtime context
max_vars - Is the maximum number of select-list items or placeholders
that the descriptor can describe.
max_name - Is the maximum length of select-list or placeholder names.
max_ind_name - Is the maximum length of indicator variable names,
which are optionally appended to placeholder names. This parameter
applies to bind descriptors only, so set it to zero when allocating a
select descriptor.
In ANSI C notation, this would be:
SQLDA *SQLSQLDAAlloc(dvoid *context, unsigned int max_vars, unsigned
int max_name, unsigned int max_ind_name);
Quote:
>Thanks a lot
>Thomas Rieffel
Thanks!
Joel
Joel R. Kallman
Oracle Service Industries
Columbus, OH
----
The statements and opinions expressed here are my own
and do not necessarily represent those of Oracle Corporation.