public static void AddNewInventory(string STU_NAME, string GPA, string COURSE, string identification, string datetime)
{
OracleDatabase db = (OracleDatabase)DatabaseFactory.CreateDatabase("WHTS");
string sql = "Begin Insert into I_Student (STU_ID, STU_NAME, GPA, COURSE, IDENTIFICATION, DATETIME,) Values (I_STU_ID.NEXTVAL, '" + stu_name.Replace("'", "''") + "', '" + GPA.Replace("'", "''") + "', '" + COURSE.Replace("'", "''") + "', '" + identification.Replace("'", "''") + " '" + "', DATETIME('" + DATETIME + " 00:00:00', 'MM/DD/YYYY HH24:MI:SS');End";
Console.WriteLine("Insert SQL = " + sql.ToString());
using (System.Data.Common.DbCommand cmd = db.GetSqlStringCommand(sql))
{
db.ExecuteNonQuery(cmd);
}
}
Finally I got it worked I just added begin and end to my sql statement