Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Problem with Native SQL DB connection.

Former Member
0 Likes
338

Hi Gurus,

Depending on the value of a parameter (a or b)

I create 2 connections.

In both the cases connection is made as follows.

EXEC SQL.
CONNECT TO :CONNECTIONNAME AS :SY-UNAME.
ENDEXEC.

(Where connection name is different in both the cases & accessing DB table is also different).

Now it gives me following dump when both the cases are executed one by one.

EXSQL_ILLEGAL_CONNECTION

How to avoid this dump ?

Thanks in Advance,

deepanadhi.

1 REPLY 1
Read only

former_member222860
Active Contributor
0 Likes
309

You can't use SY-UNAME in the Native Sql, So give the DB connection name