Consultor Eletrônico



Kbase P10742: ESQLC login fails with connection statement EXEC SQL CONNECT TO :
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   13/11/2008
Status: Unverified

SYMPTOM(s):

ESQLC login fails with connection statement EXEC SQL CONNECT TO :connect_string AS 'connection name' USING 'username' USING 'password'
;

Program fails when compiling the program

If the USING option is omitted it works

ESQLC error (test.pc line 23 'password') : syntax error near "'password'".
DLC/bin/efglc +M +S test.pc test.c
returned error status 256

CAUSE:

There is an error in our documentation.

The embedded SQL manual section for SQL-92, for the
Connect statement, should state that the password must be a parameter
reference, as in this example:


char mypass[] = "xxxyyyzzz";
exec sql connect to 'progress:T:localhost:3001:sports'
as 'con' user 'fleste' using :mypass ;

FIX:

Compile the test.pc file without specifying any password.

In the test.c file, comment the tpe_get_cur_userpw() method invoked in

order to avoid asking the password.

Use the correct password in the tpe_sqlconnect statement.