C++ and ODBC ExecDirect()

L

lavu

I am using SQL ODBC's ExecDirect() call to execute a SQL statement.
There SQL
statements are SELECT that have bound cols and I process the output
based on return
values.

(a) Sometimes there is pre processing and I can piggy back another
statement like
DECLARE LOCAL TEMPORARY TABLE temp_table ...............
INSERT INTO temp_table ..............SELECT ddtl.dsvc_seq,
with the
ACTUAL SELECT statement here after the temp_table has values.

This goes through fine with a single EXECDirect call.

(b) However I cannot send in two select statements at the same time,
possibly because
of binding. Although my first SELECT is a SELECT ....INTO which
implies that it does
not return anything.

I have two questions:

1. why does the first combination (a) work and the seoncd (b) does not
?

2. Is there any way to get the second one (b) to work ?

Any thoughts will be greatly appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top