Solved

Error connecting to Oracle database from .Net windows forms

Posted on 2007-12-04
3
2,329 Views
Last Modified: 2013-12-18
I am trying to connect to Oracle database from .Net Windows forms and I get "OCIEnvCreate failed with return code -1 but error message text was not available".

OracleConnection _oraConnection = new OracleConnection();
string connectionString = "Data Source=mydatabase.co.karu.com;User ID=tempuser;Unicode=True; password=pass123";
 _oraConnection.ConnectionString = connectionString;
_oraConnection.Open();
System.Windows.Forms.MessageBox.Show("Login Success");

Open in new window

0
Comment
Question by:Karuppaiah
  • 2
3 Comments
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 250 total points
ID: 20525103
hi,

This is most likely caused by one of:
1. Not having the .net Oracle client library installed
2. Not having the correct version of .net Oracle client library installed
3. Not having the Oracle Client installed/configured at all

is this happening in development, or on an installed client?
0
 

Author Comment

by:Karuppaiah
ID: 20794156
Need to install Oracle client for vista
0
 

Author Comment

by:Karuppaiah
ID: 20794174
thanks
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Concat multi row values of a field in oracle 6 64
selective queries 7 30
ODBC in excel 2016 in Windows 10 via VBA 16 83
Oracle collections 15 23
Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.
This video shows how to recover a database from a user managed backup

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question