hi the main Query to get sequence number is follow
select JOB_ID_SEQ.NEXTVAL from dual;
i get the required Sequence number value form following method
public int GetOracleSequenceValue(string _SequenceValue)
{
OdbcCommand _command = new OdbcCommand();
int _ItemValue = -1;
OdbcConnection _con = new OdbcConnection(System.Web.Configuration.WebConfigurationManager.ConnectionStrings["RCConnectionString"].ToString());
try
{
_con.Open();
_command.Connection = _con;
string _QueryString = "select "+ _SequenceValue +" from dual ";
_command.CommandText = _QueryString;
_ItemValue = Convert.ToInt32(_command.ExecuteScalar().ToString());
_con.Close();
}
catch (Exception ex)
{
Util.LogErrorToFile(ex, "MYExecuteNonQuery", "error");
}
finally
{
_con.Close();
}
return _ItemValue;
}
Chears