By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,992 Members | 934 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,992 IT Pros & Developers. It's quick & easy.

Conecting Orcale with c# windows application

P: n/a
Hi when i try below code

public DataSet GetData(string ConString)
{

OracleDataAdapter da;
DataSet ds = new DataSet();

// Setup connection string to access Oracle 9i
// Instantiate the connection, passing the
// connection string into the constructo

OracleConnection con = new OracleConnection(ConString);

// Open the connection
con.Open();

// Populate DataSet and close the Database Connection
string sql = "SELECT * From customer";
da = new OracleDataAdapter (sql,con);
da.Fill(ds,"Customer");

// Close the connection
con.Close();
return ds;
}

i get that error
An unhandled exception of type 'System.Exception' occurred in
system.data.oracleclient.dll

Additional information: System.Data.OracleClient requires Oracle client
software version 8.1.7 or greater.

i am using ODBC driver with acces working fine but now i am trying to
convert my application from access to c#..... i got above errors

Sep 6 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Amjad,

The error is pretty self-explanitory. You need to have the Oracle
Client Software installed, and it must have a version of 8.1.7 or greater.
If you don't want to install that, then I would use the ODBC driver for
Oracle, and use the classes in the System.Data.Odbc namespace instead.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"amjad" <am***@discussions.microsoft.comwrote in message
news:F1**********************************@microsof t.com...
Hi when i try below code

public DataSet GetData(string ConString)
{

OracleDataAdapter da;
DataSet ds = new DataSet();

// Setup connection string to access Oracle 9i
// Instantiate the connection, passing the
// connection string into the constructo

OracleConnection con = new OracleConnection(ConString);

// Open the connection
con.Open();

// Populate DataSet and close the Database Connection
string sql = "SELECT * From customer";
da = new OracleDataAdapter (sql,con);
da.Fill(ds,"Customer");

// Close the connection
con.Close();
return ds;
}

i get that error
An unhandled exception of type 'System.Exception' occurred in
system.data.oracleclient.dll

Additional information: System.Data.OracleClient requires Oracle client
software version 8.1.7 or greater.

i am using ODBC driver with acces working fine but now i am trying to
convert my application from access to c#..... i got above errors

Sep 6 '06 #2

P: n/a
If you really want to just run and see and not dealing with odbc, you
can select oledb driver for oracle which comes with it.
If you want to use odbc driver, then ditto on Nicholas
Nicholas Paldino [.NET/C# MVP] wrote:
Amjad,

The error is pretty self-explanitory. You need to have the Oracle
Client Software installed, and it must have a version of 8.1.7 or greater.
If you don't want to install that, then I would use the ODBC driver for
Oracle, and use the classes in the System.Data.Odbc namespace instead.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"amjad" <am***@discussions.microsoft.comwrote in message
news:F1**********************************@microsof t.com...
Hi when i try below code

public DataSet GetData(string ConString)
{

OracleDataAdapter da;
DataSet ds = new DataSet();

// Setup connection string to access Oracle 9i
// Instantiate the connection, passing the
// connection string into the constructo

OracleConnection con = new OracleConnection(ConString);

// Open the connection
con.Open();

// Populate DataSet and close the Database Connection
string sql = "SELECT * From customer";
da = new OracleDataAdapter (sql,con);
da.Fill(ds,"Customer");

// Close the connection
con.Close();
return ds;
}

i get that error
An unhandled exception of type 'System.Exception' occurred in
system.data.oracleclient.dll

Additional information: System.Data.OracleClient requires Oracle client
software version 8.1.7 or greater.

i am using ODBC driver with acces working fine but now i am trying to
convert my application from access to c#..... i got above errors
Sep 6 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.