cant insert into a postgre sql table from c# please help to solve this......... |Thanks very much in advance

Started by kona ajayabout 12 years ago1 messagesbugs
Jump to latest
#1kona ajay
konaajay@gmail.com

here i am sending my actual code

string employee = "insert into VSP_Employee values ('" + txtEmpid.Text +
"','" + txtEmpname.Text + "','" + txtEmailid.Text + "','" + txtphnum.Text +
"','" + txtDOB.Text + "','" +txtDOJ.Text + "','" + txtNOD.Text + "','" +
txtSalary.Text + "','" + txtLeavestaken.Text + "','" +
txtLeavesBalance.Text + "','" + txtPlannedleaves.Text+"')";
NpgsqlDataAdapter da = new NpgsqlDataAdapter(employee,
conn);
cmd = new NpgsqlCommand(employee, conn);
da = new NpgsqlDataAdapter(cmd);
ds = new DataSet();
da.Fill(ds, "VSP_Employee");

Please help me in fixing this . Thanking you