Adagio
8 years agoFrequent Contributor
Connecting to Oracle DB issue
Hello,
I have this connection string to set up a connection between TestComplete Tests and Oracle DB. I have 2 problems here
1. I want to pass the Schema and Database Name in the Connection String. Not sure what params should I add for that in the connection string.
2. When I run the following piece of code, I get an error
"JavaScript runtime error. [Microsoft][ODBC Driver Manager] Data source name too long Error location: "
Here's the code that I'm using:
var conn = ADO.CreateADOConnection(); conn.ConnectionString = "DRIVER={Oracle in OraClient12Home1_32bit};Data Source=(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = tt-mpt.domain.com)(PORT = 1521)))(CONNECT_DATA =(SERVICE_NAME = XYZ))); User Id=XREAD; Password=XREAD;" conn.LoginPrompt = false; conn.Open(); Log.Message("Oracle connection established");
Any help would be appreciated!
Thank you
Abhi