Hi Guys,
I am trying to make a simple connection from my desktop(local computer) with Oracle 11g which is installed on windows server 2008 R2.Now I have problems with the ConnectionString.

could you please let me know how I set a correct connection String while I have parameters like these:
Database name: GISData
Server Name : SRV_GISSER
Port : 1521
User Name : Example
Password: : Example
I already tried the

ConnectionString = "provider=MSDAORA;data source=GISData;user id=Example;password=Example";

an I am getting this exception:
An Exception of type System.Data.OleDb.OlDbException was thrown\nORA-12154:TNS:Could not resolve the connect identifier specified
I know that I am missing the server part but Honestly I do not know how to provide the string with it!

Thanks

Hi, it seems your connection string is not the right one. Have you checked here for it?
And are you sure about your parameters enters into connection string? Are defenatelly the right one?

Hi and Thanks again:$
I see the page "Connection strings for Oracle"
but the problem is I do not know how to use them for example in:
Using TNS

Data Source=TORCL;User Id=myUsername;Password=myPassword;

what is the TORCL? is this the database name? if so? how we can connect to the server?

DataSource (TORCL in this case) is, yes the dataBase name.
Why dont you use this one, a standard one:

Standard security
This connection string uses a provider from Microsoft.
Provider=msdaora;Data Source=MyOracleDB;User Id=myUsername;Password=myPassword;

Provider=msdaora;Data Source=GISData;User Id=Example;Password=Example;

I am using this but as a I told you before I got this exception:
An Exception of type System.Data.OleDb.OlDbException was thrown\nORA-12154:TNS:Could not resolve the connect identifier specified

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.