Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
DB connection string issue
#1
Solved: 10 Years, 9 Months ago Question 
I’ve been trying to figure out how to write the connection string (for a database which uses named instance) in QTP test scripts without success.

In a different computer where default named instance is used then the following works
Code:
cnt.ConnectionString= "Driver={SQL Server};Integrated Security=SSPI;Initial Catalog=cccccc;[b]Data Source=.[/b];UID=uuuuuu;PWD=pppppp;Trusted_connection=True"

but in a computer where instance name is used, I tried the followings:

Code:
cnt.ConnectionString= "Driver={SQL Server};Integrated Security=SSPI;Initial Catalog=cccccc;[b]Data Source=.\instance_name[/b];UID=uuuuuu;PWD=pppppp;Trusted_connection=True"
cnt.ConnectionString= "Driver={SQL Server};Integrated Security=SSPI;Initial Catalog=cccccc;[b]Data Source=computer_name\instance_name[/b];UID=uuuuuu;PWD=pppppp;Trusted_connection=True"
cnt.ConnectionString= "Driver={SQL Server};Integrated Security=SSPI;Initial Catalog=cccccc;[b]Data Source=computer_ipaddr\instance_name[/b];UID=uuuuuu;PWD=pppppp;Trusted_connection=True"
but nothing works!!!

I’m wondering if anyone here can show me how to; I’d really appreciate your help.
Thanks in advance.
Reply


Messages In This Thread
DB connection string issue - by jackmartins - 07-04-2013, 12:33 AM
RE: DB connection string issue - by SteveS - 07-04-2013, 02:10 PM
RE: DB connection string issue - by Staff - 07-05-2013, 02:47 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Connection to oracle using JDBC and QTP dileep45 0 3,299 07-30-2013, 06:39 PM
Last Post: dileep45
  Connection string for oracle (Remote DB) in QTP rohit330 1 5,926 02-23-2012, 07:53 PM
Last Post: rohit330
  How to have a variable that has a string comma string .. shareq1310 5 4,779 11-09-2011, 03:33 PM
Last Post: parminderdhiman84
  Database connection - TNS error Shwetha 2 4,839 05-24-2011, 02:27 PM
Last Post: surya_7mar
  Remote Database connection through QTP PrabhatN 4 7,599 12-02-2010, 12:53 PM
Last Post: cdesserich

Forum Jump:


Users browsing this thread: 1 Guest(s)