Hi, I was able to connect to oracle database I could successfully load data return to a data grid in webform too.But ReSharper says " Class 'System.Data.OracleClient.OracleConnection' is obsolute : "OracleConnection has beeb depreciated "http://msdn.microsoft.com/en-us/library/77d8yct7.aspx"Other than the warning every thing works fine. My question is how to improve my code. what I have to do to use ODP.net Following is my Code. // get the connection string
private static string GetConnectionString()
{
var connectionString = ConfigurationManager.ConnectionStrings["OracleConnectionString"].ConnectionString;
return connectionString;
}
public static DataSet GetExchagRateDataOracle()
{
const string query = "select cur_cod,rat_exc from unrattab where lst_ope = 'U'and TO_CHAR(SYSDATE, 'DD-MON-YYYY') between eea_dov and eea_eov";
var myConnection = new OracleConnection(GetConnectionString());
var myCommand = new OracleCommand(query, myConnection);
var ad = new OracleDataAdapter(myCommand);
var ds = new DataSet();
ad.Fill(ds, "ExchangeRate");
return ds;
}Thank you Mohamed Ziyad
View Complete Post