bommareddy
8 years agoContributor
Unable to connect to Oracle Database
Hi Team,
As a part of testing, I want to connect and retrieve the values from oracle database tables. So I am trying to connect Oracle DB using ADODB connections in the script.
Function OracleDBvalues
Set con= CreateObject("ADODB.Connection") con.ConnectionString = "Provider=OraOLEDB.Oracle; User Id=userName;Password=password;Data Source=dataSourceName;Persist Security Info=True" con.Open query = "select * from tableName" Set RecSet = con.Execute(query) con.Close
End Function
I am facing the following error while running the above script.
ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA
Any pointers and suggestions are really appreciated. Also please let me know if you require any other details in this regard.
Regards, BommaReddy