cancel
Showing results for 
Search instead for 
Did you mean: 

Using .NET ODBC with mutiple queries

Former Member
0 Kudos

Hi

The following statement works fine in Hana Studio:

CREATE LOCAL TEMPORARY  table #prc as (select '1' AS Test from dummy);

SELECT * FROM #prc;

DROP TABLE #prc

But when executed via the .NET Odbc Driver it doesn't work.

Looks like the driver doesn't like multiple queries.

When using the SqlClient (Micorsoft) it works.

Do i miss something?

Thanks for any enlightment.

Philipp

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member184713
Participant
0 Kudos

Are you trying to run the 3 queries in only one execution by separating them with ;  ?

That does not work with the hana odbc driver.It crash when it find a ;

You will probably need to execute the 3 query, one at a time without ;

Former Member
0 Kudos

So the hdbodbc driver doesn't support multiple queries at all?

former_member184713
Participant
0 Kudos

In revision 41, No. Later, I doubt this functionality has been added, so most likely No, but I haven't checked.

Former Member
0 Kudos

Ok thanks

lbreddemann
Active Contributor
0 Kudos

HI Keven,

with HANA you cannot string multiple commands into one "execute" call.

Specifically for the commands above you actually don't want it to be in just one call as you want to be able to deal with errors for each of the commands differently.

This is not a restriction of the ODBC driver but it's generally the way HANA processes commands.

If you select multiple commands in HANA studio and execute them, HANA studio generate multiple "execute" calls for them.

- Lars