Solved

Error connecting to Oracle database from .Net windows forms

Posted on 2007-12-04
3
2,334 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 143

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
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…
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

717 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