PC Review


Reply
Thread Tools Rate Thread

Conecting Orcale with c# windows application

 
 
=?Utf-8?B?YW1qYWQ=?=
Guest
Posts: n/a
 
      6th Sep 2006
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

 
Reply With Quote
 
 
 
 
Nicholas Paldino [.NET/C# MVP]
Guest
Posts: n/a
 
      6th Sep 2006
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]
- (E-Mail Removed)

"amjad" <(E-Mail Removed)> wrote in message
news:F1E66768-EC18-4A95-B573-(E-Mail Removed)...
> 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
>



 
Reply With Quote
 
srini
Guest
Posts: n/a
 
      6th Sep 2006
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]
> - (E-Mail Removed)
>
> "amjad" <(E-Mail Removed)> wrote in message
> news:F1E66768-EC18-4A95-B573-(E-Mail Removed)...
> > 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
> >


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conecting Access to SQL in Windows 7 RSteph Microsoft Access 4 26th Jan 2010 06:50 PM
conecting windows mail and windows live jb72k20 Windows Vista Mail 6 5th Jan 2010 06:48 AM
Using Roming Profiles on Windows XP Pro conecting to Win 2000 Serv =?Utf-8?B?V0FDQSBTeXNBZG1pbg==?= Windows XP Configuration 1 29th Dec 2005 01:19 PM
Conecting New Computer With XP to 386 with Windows 3.1 =?Utf-8?B?RmllYmlnZXI=?= Windows XP General 1 27th Nov 2004 01:47 PM
XP Pro Conecting to a Windows 2000 server! RyanWirth Microsoft Windows 2000 Networking 4 29th Aug 2003 07:53 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:30 AM.