Solved

Error connecting to Oracle database from .Net windows forms

Posted on 2007-12-04
3
2,323 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.

Join & Write a Comment

How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
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.

762 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now