cancel
Showing results for 
Search instead for 
Did you mean: 

Spacial Characters in JDBC STEP in password

SOLVED
Highlighted
Community Hero

Re: Spacial Characters in JDBC STEP in password

It is a URL in the strictest definition of the sense....the protocol at the beginning of the address dowsbt have to be 'http' for it to be a URL.

You are passing the request string via http hence the reason why i wondered if %encoding would do the job (which encodes all special chars)

Thats ir then. Escaping doesnt work on your sqlserver instance.
Other option = change the password

Ta

Rich
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
Highlighted
Occasional Contributor

Re: Spacial Characters in JDBC STEP in password

Hi,

 

Change the password is not the option, Need to set a complex password and it should be handled by readyAPI by some jars or by escaping char.

 

 

Highlighted
Community Hero

Re: Spacial Characters in JDBC STEP in password

Hey @nkdogra90,

Ive had to set complex passwords with special chars before on a database, however, i made sure the special chars used did NOT use reserved sql and reserved http chars to ensure i didnt have your problem.

Yes, youre right....if escaping is possible id expect it to be handled by the driver .jar (which is 'mssql-jdbc-7.0.0.jre8.jar' on my laptop cos im connecting to sqlserver 2018).

However. I have no idea why people setup databases with passwords that have reserved sql and reserved http characters....its seems obvious to me that it can cause a world of pain trying to escape the password or username.
All i can suggest is that you determine the actual version number of the sqlserver instance youre trying to connect to and google for "escaping passwords sqlserver version whatever" yourself. Then at least youll not retrieve most of the contradictory info i found (i suspect the info was contradictory due to the info retrieved for all sqlserver versions) and determine IF in fact you can escape the special chars. According to all the searching i did, i found a lot of people have had the same problem as you over the years with escaping and have not managed to escape the password successfully.

Perhaps youll find a link that works, but if youve already tried using the curly brace character, backslash character and % encoding and none of these were successful and you were escaping correctly, then i doubt youll find anything. Although as i said above, i didnt search for your sqlserver version number when i was looking....perhaps your filtered google search will find something i missed.

I dont believe this is a ReadyAPI! issue. The way to prove this is to setup the same database connection, using the same jdbc driver .jar and connection URL string using a different DB interrogation tool like DBVisualiser. Youll get the same issue when attempting to login as you do in ReadyAPI!. Either the driver .jar doesnt support escaping or youre escaping incorrectly.

Cheers,

Rich
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
New Here?
Join us and watch the welcome video:
Announcements
Script Wanted
Check out this week's challenge!

Create a script to generate an email when an assertion fails for the TechCorner tag!


Scripts created in July:
- A script to change the request body before sending it to the server