Oracle connection
Options
I currently have a connection string like:
"Data Source = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = )(PORT = 1521))(CONNECT_DATA = (SERVICE_NAME = )));User Id = ; Password = ;"
This works in a .NET application. I would like to know how this information can be put into LINQPad. I have downloaded the Oracle drivers but when I select this driver I am not prompted for all of the information. WHen I go to the "Advanced" tab I put in this connection string but the "Test" button is disabled. Any one else successfully setup an Oracle connection? If so, would you mind sharing? Thank you.
"Data Source = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = )(PORT = 1521))(CONNECT_DATA = (SERVICE_NAME = )));User Id = ; Password = ;"
This works in a .NET application. I would like to know how this information can be put into LINQPad. I have downloaded the Oracle drivers but when I select this driver I am not prompted for all of the information. WHen I go to the "Advanced" tab I put in this connection string but the "Test" button is disabled. Any one else successfully setup an Oracle connection? If so, would you mind sharing? Thank you.
Comments
-
You could try using the new LINQ to DB driver which is now available in the LINQPad drivers gallery. This lets you enter a plain connection string.
-
I tried this but I get an error on "Test" that says the connection timed out
-
I just gave up on setting up a connection. Now I am trying to setup an Oracle connection via ADO.NET like:
using (var oraConn = new Oracle.DataAccess.Client.OracleConnection(connectionString))
But I am getting an BadImageFormatException
Could not load file or assembly 'Oracle.DataAccess, Version=4.121.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. An attempt was made to load a program with an incorrect format.
How do I load this assembly? I have obviously added to the namespace.
Kevin -
I tried this connection and it got further
using (var oraConn = new Oracle.ManagedDataAccess.Client.OracleConnection(connectionString))
Now the exception is that I don't have the right user name and password. Which is odd because the user name and password work for all my other projects outside of LinqPad.
Incidentally, when I tried to set up a connection from "Add connection" I get the same error that the user name/password is incorrect. The credentials are correct there is some formatting issue. -
Did you try something like this? works like a charm