on 06-14-2022 7:51 PM
Hi,
I am trying to connect to SAP HANA database with JDBC Driver using a connection string, and the password contains the & char (e.g. jdbc:sap://192.168.1.50:443/?encrypt=true&user=USER&password="My&Passwd")
I escaped the whole password with double-quotes (which correctly escapes other special chars) but I always received an authentication failed error.
I tried also to escape the & char in many ways (e.g. &&, \&, %26), but none works.
Do someone know if there is a way to escape the & char?
Thanks
Enrico
Hi Enrico, have you tried this format?
//Option2, specify the connection parameters //"jdbc:sap://10.11.123.134:39015/?encrypt=true&validateCertificate=false", "User1", "Password1");
Connect Using the SAP HANA JDBC Driver | Tutorials for SAP Developers
Or via properties?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Thorsten,
yes, I already tried your Option2, and it works.
For design purposes, I need to insert the user and the password inside a connection string (not as external parameters).
Do you know if there is any way to escape this char? I tried many other special chars, and all of them are correctly recognized by putting the password inside double-quotes.
It seems a problem of this specific char.
Moreover, I tried to put the ampersand char in other properties, and it is correctly recognized. It seems a problem that appears only inside the password.
Thank you so much
Enrico Giarola
I believe this is a "BUG".
Perhaps you can fire a ticket for it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello
I work with Enrico, and I have raised a ticket for component HAN-DB-CLI.
Michael
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.