Problems using sqlaldt, dynamic SQL 
Author Message
 Problems using sqlaldt, dynamic SQL

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".

Thanks a lot

Thomas Rieffel



Sat, 11 Aug 2001 03:00:00 GMT
 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.



Sat, 11 Aug 2001 03:00:00 GMT
 Problems using sqlaldt, dynamic SQL

(if that email address didn't require changing)

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

can you define what "this didn't work" means.  Besides having the name of the
routine wrong (it would look more like:

select_dp = sqlald (size, MAX_VNAME_LEN, MAX_INAME_LEN);

what is 'wrong' about it?  what error are you getting?

Quote:
>#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".

>Thanks a lot

>Thomas Rieffel

Thomas Kyte

Oracle Service Industries
Reston, VA   USA

--
http://govt.us.oracle.com/    -- downloadable utilities

----------------------------------------------------------------------------
Opinions are mine and do not necessarily reflect those of Oracle Corporation



Sat, 11 Aug 2001 03:00:00 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. Problem creating query strings using dynamic SQL...

2. problem returning NOTFOUND when dynamic SQL used

3. ddl using dynamic sql problem

4. Using dynamic SQL better than using an sp?

5. SQLSQLDAAlloc() and sqlaldt()

6. Dynamic SQL Vs Static SQL using Pro*C..

7. dynamic sql using T-SQL

8. : Dynamic SQL (ad-hoc query) using Embedded SQL

9. Problem using the TSEQUAL function in a dynamic update

10. Problem using the TSEQUAL function in a dynamic update


 
Powered by phpBB® Forum Software