日期:2014-05-17 浏览次数:20506 次
SqlConnection conn = new SqlConnection("server=.;database=test;uid=sa;pwd=123456");
string sql = "insert into Table_1(ssdate) values (@ssdate)";
SqlCommand cmd = new SqlCommand(sql, conn);
cmd.Parameters.Add("@ssdate", SqlDbType.SmallDateTime).Value = DBNull.Value;
conn.Open();
cmd.ExecuteNonQuery();