troubleshooting Question

C# insert into Oracle

Avatar of triplebd69
triplebd69 asked on
.NET ProgrammingEditors IDEs
8 Comments1 Solution19371 ViewsLast Modified:
I am new at this and need help with what I hope is a simple question.  I have a C# app that needs to insert records into an Oracle db.  The code I have runs without error but does not actually insert a record.  Here is my code so far.

string eEmpID = tbEmpID.Text;
string eFName = tbFName.Text;
string eLName = tbLName.Text;
string eEmail = tbEmail.Text;
string ePhone = tbPhone.Text;
string eHireDate = " ";
string eJobID = ddlJobID.SelectedValue;
string eGrade = ddlGrade.SelectedValue;
                  
using (OracleConnection con = new OracleConnection(Configuration.oConn))
{
con.Open();

string oCMD = "insert into RANDRAPP.EMPLOYEES(EMPLOYEE_ID, FIRST_NAME, LAST_NAME, EMAIL, PHONE_NUMBER, HIRE_DATE, JOB_ID, SALARY, MANAGER_ID, DEPT_ID, TIME_REMAINING) VALUES (eEmpID, eFName, eLName, eEmail, ePhone, eHire_Date, eJobID, eGrade)";

OracleCommand cmd = new OracleCommand(oCMD, con);
}
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 8 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros