Micro Focus QTP (UFT) Forums
SQL Connection String with DSN - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Others (https://www.learnqtp.com/forums/Forum-UFT-QTP-Others)
+--- Thread: SQL Connection String with DSN (/Thread-SQL-Connection-String-with-DSN)



SQL Connection String with DSN - geethwind - 10-05-2011

Hi

I am into a weird problem with connection string.

my system has
SQL server 2008
QTP 11
Windows 2008 E2(64 bit)

when establising a SQL connection if i provide the connection string as,
Code:
("APP=QuickTest Professional;" & "UID=" & DBUID & ";PWD=" & PWD & ";DSN=" & DSNNAME & ";WSID=" &  DSNNAME & ";DATABASE=" & DATABASE )

Its throwing an error SQL server doesn't exist or accessdenied.

(Note: I checked the User DSN exists)

but when i give the connection string as
Code:
strConnection = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;User ID=sa; Initial Catalog=TESTDB;Data Source=tcp:ipaddress,port".

It works.

Ideally i am supposed to use DSN only as per standards...

can anybody help..what is causing issue with my DSN thing?

also, the non working connection string works perfectly in 32 bit environment. the issue is with the 63 bit environment only..

any inputs are highly appreciated.

Thanks,
Geeta