日期:2014-05-17 浏览次数:20908 次
SqlCommand cmd = new SqlCommand("insert into t_version_base(version,version_name,create_sid,create_time,file_path,updata_type) values(@version,@version_name,@create_sid,@create_time,@file_path,@up_type)", conn);
cmd.Parameters.AddWithValue("@version", textBox2.Text);
cmd.Parameters.AddWithValue("@version_name", textBox2.Text);
cmd.Parameters.AddWithValue("@create_time", DateTime.UtcNow.ToString());
cmd.Parameters.AddWithValue("@create_id", textBox6.Text);
cmd.Parameters.AddWithValue("@file_path", textBox1.Text);
cmd.Parameters.AddWithValue("@up_type", "Y");
using (conn)
{
cmd.CommandType = CommandType.Text;
cmd.ExecuteNonQuery();
//SqlDataReader t_version_base = cmd.ExecuteReader();
}