An easy way to create Database connection string in UFT
I was also facing a lot of issues while creating the database connection string and remembering all the parameters. And always thought if there is any utility which i can use to create the connection string easily and can test it also without running my code.
In UFT we have the microsoft query wizard where we can create the new connection string using the wizard and can save it in a dsn file. Below are the steps:
1. Open the Microsoft query wizard in UFT. Below screenshot will give you the easiest way to open it from UFT:
2. After clicking on "From Database" as shown in above screenshot. Select option "Specify SQL statement Manually" and click on Next.
5. After performing above step, select the driver based on the database you want to connect. I am creating for Oracle database, so selecting oracle odbc driver. After selecting driver click on Next.
6. Type the name of the DSN file you want to create. It will be created on your machine and you can refer it in future. After providing Name click on Next.
7. Click on Finish
Now the connection string is created in the DSN file, so either you can open the DSN file as text file and copy the connection string from there or from the wizard.
In UFT we have the microsoft query wizard where we can create the new connection string using the wizard and can save it in a dsn file. Below are the steps:
1. Open the Microsoft query wizard in UFT. Below screenshot will give you the easiest way to open it from UFT:
2. After clicking on "From Database" as shown in above screenshot. Select option "Specify SQL statement Manually" and click on Next.
3. Now click on Create button shown in below screenshot:
4. Now it will take you to create or select Data source. As we are creating a new, so you need to click on New button as shown in below screenshot:
6. Type the name of the DSN file you want to create. It will be created on your machine and you can refer it in future. After providing Name click on Next.
7. Click on Finish
Now the connection string is created in the DSN file, so either you can open the DSN file as text file and copy the connection string from there or from the wizard.
Comments
Post a Comment