08-24-2012, 07:56 PM
Create a DSN if you are aware of the server details and use DSN instead of connection string
you will have to use the below lines for establishing connection
To check on how to create a DSN (Data source name) file or create connection strings please see the below thread
https://www.learnqtp.com/qtp-database-pa...n-strings/
Regards,
Ravi
you will have to use the below lines for establishing connection
Code:
Str_Connect= "DSN=<DSNName>;UID=<useridtonconnect to databas>;pwd=<password>;"
'Create Connection object
Set oCon=CreateObject("ADODB.Connection")
oCon.Open Str_Connect
https://www.learnqtp.com/qtp-database-pa...n-strings/
Regards,
Ravi