Advertisement

02.28.2007 at 08:59AM PST, ID: 22419176
[x]
Attachment Details

C# insert into Oracle

Asked by triplebd69 in Microsoft Visual C#.Net, .Net Editors & IDEs, Visual Studio .NET 2003

Tags: insert, oracle

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);
}Start Free Trial
[+][-]02.28.2007 at 11:09AM PST, ID: 18627741

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.28.2007 at 11:20AM PST, ID: 18627832

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.28.2007 at 11:22AM PST, ID: 18627851

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.28.2007 at 11:33AM PST, ID: 18627970

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.28.2007 at 11:42AM PST, ID: 18628061

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Visual C#.Net, .Net Editors & IDEs, Visual Studio .NET 2003
Tags: insert, oracle
Sign Up Now!
Solution Provided By: dstanley9
Participating Experts: 1
Solution Grade: A
 
 
[+][-]02.28.2007 at 11:59AM PST, ID: 18628231

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.28.2007 at 12:01PM PST, ID: 18628242

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.28.2007 at 12:03PM PST, ID: 18628265

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32