Thank you this is the insert code.
private void Save_Click(object sender, System.EventArgs e)
{
//
// sqlInsertCommand1
int rsIdentity;
SqlCommand cmdGetIdentity = new SqlCommand();
SqlConnection conn = null;
SqlDataReader rdr = null;
try
{
conn = new SqlConnection("Server=icc-server;DataBase=kennel;Integrated
Security=SSPI");
if (sqlConnection1.State != ConnectionState.Open)
{
conn.Open();
}
SqlCommand cmd = new SqlCommand("InsertCommandTask", conn);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add(new SqlParameter("@service_nmb_1",
Convert.ToInt32(txtServiceNumber.Text)));
cmd.Parameters.Add(new SqlParameter("@service_order_task_2",
Convert.ToInt64(txtServiceOrderTask.Text)));
cmd.Parameters.Add(new SqlParameter("@service_code_3",
Convert.ToInt32(txtServiceCode.Text)));
cmd.Parameters.Add(new SqlParameter("@service_date_4",
Convert.ToInt32(txtServiceDate.Text)));
cmd.Parameters.Add(new SqlParameter("@service_time_5",
Convert.ToInt32(txtSerTime.Text)));
cmd.Parameters.Add(new SqlParameter("@animal_id_6",
Convert.ToInt32(txtAnimalId.Text)));
cmd.Parameters.Add(new SqlParameter("@owner_id_7",
Convert.ToInt32(txtOwnerId.Text)));
cmd.Parameters.Add(new SqlParameter("@animal_size_ind_8",
Convert.ToInt32(cbAnimalSize.Text)));
cmd.Parameters.Add(new SqlParameter("@service_description_9",
Convert.ToInt32(txtServiceDesc.Text)));
cmd.Parameters.Add(new SqlParameter("@cost_10",
Convert.ToInt32(txtServiceCost.Text)));
rdr = cmd.ExecuteReader();
if (rdr.Read())
{
MessageBox.Show("Insert Complete. [services] " + conn +
" Successful.","");
}
William (Bill) Vaughn said:
Let's see the code that sends this date value to the database.
--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com/blog/billva
www.betav.com
www.sqlreportingservices.net
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no
rights.
__________________________________