Toad for Sybase: Command line connection string

Hi,

I am working on a brokering module where the requirement is to inject details like Username, Password, Hostname and Port from the command line (or using any API if one exists) into Toad for Sybase, so that all these details are prefilled for the user and the user just needs to click on the connect button to establish a database connection. I am doing this to broker the database connection. I saw similar feature in Toad for Oracle through Command "-C username/password@hostname" but how it can be done for Toad for Sybase?

Any guidance on this will be a great help.

Thanks…

Toad does support connection through command line. It needs a .tcs (connection specification file) as argument.

"C:\Program Files (x86)\Dell\Toad for SAP Solutions 3.0\toad.exe" "C:\temp\MyConnention.tcs"

To make such a connection specification file, please create the connection in toad and connect to it, while you have focus on it and go to File | save file as, it will prompt you to save it as a *.tcs file with the password encrypted.

Please let me know if it work for you or not.

Thanks!

Hi Kiki, thanks for your reply.

Connecting using .tcs file is a very nice idea, and the best part is, this file can be created programmatically.

However, my scenario is little different. I don’t want to disclose the password to the user as I am trying to brokering the access. The password I will get from the other system and want to inject dynamically with other details like Hostname, username and port.

I checked the password in the .tcs file which is in encrypted form and when I tried to pass the plan password in that, like MyPasword, it didn’t work.

Any suggestions how to tackle with this.

We don’t support plain password saved in tcs file. What I can suggest is that you remove the password section from tcs file, in this case,Toad will pop up the connection dialog asking user to enter password before connect.

Hope this helps.

I have to provide the password in tcs file otherwise it will not serve my brokering application purpose.

Is it possible to encrypt the password and add it to password section in tcs file? Any idea which encryption technique Toad for Sybase is using? I am using .NET xml classes for creating the .tcs file

I’m afraid publishing what encryption we use is against company policy. We only offer to generate the file for you or create without password as ask the user to enter.