public static void AddNewInventory(string stu_name, string address, string Phone, string date)
{
string sql = "BEGIN Insert into I_Student " +
"(Student_ID, STU_Name, Address, Phone, DATE )" +
"Values(I_Student_ID.NextVAL, :STU_Name, :Address, :Phone,to_date(:DATE, 'MM/DD/YYYY HH24:MI:SS')); END; ";
Console.WriteLine("Insert SQL = " + sql.ToString());
OracleDatabase db = (OracleDatabase)DatabaseFactory.CreateDatabase("PHTS");
using (System.Data.Common.DbCommand cmd = db.GetSqlStringCommand(sql))
{
db.AddInParameter(cmd, "STU_Name", DbType.String,stu_name);
db.AddInParameter(cmd, "Address", DbType.String,address);
db.AddInParameter(cmd, "Phone", DbType.String,Phone);
db.AddInParameter(cmd, "DATE", DbType.String,date);
db.ExecuteNonQuery(cmd);
}
}
}
How can I bind the auto generated number to a textbox