l have OraConn.ExecuteNonQuery(sql)
which is calling oracle procedure now l want to run it in background by using threading
So, how i can do this in my code below
public void Row_Inserted(OrderedDictionary rsold, OrderedDictionary rsnew) {
//ew_Write("Row Inserted");
//ghalib
string theMONTH = rsnew["MONTH"].ToString();
string theYEAR = rsnew["YEAR"].ToString();
if (theMONTH.Length < 2)
{
theMONTH = 0 + theMONTH;
}
int ReadingDate = Convert.ToInt32(theYEAR + theMONTH);
int myReadingType = Convert.ToInt32(rsnew["READING_TYPE"].ToString());
if (myReadingType == 1)
{
var OraConn = ew_GetConn();
string sql = "CALL READING_DATA(" + ReadingDate + ")";
OraConn.ExecuteNonQuery(sql);
}
else if (myReadingType == 2)
{
var OraConn = ew_GetConn();
string sql = "CALL GetData()";
OraConn.ExecuteNonQuery(sql);
}
}