开发者

ASP.NET coding for insert data

开发者 https://www.devze.com 2022-12-22 03:34 出处:网络
i want sample coding to insertdata into SQL SEr开发者_StackOverflow中文版ver 2005 using ASP.NET The most basic using a store procedure, but agree with @TomTom you probably need to get a little info on

i want sample coding to insert data into SQL SEr开发者_StackOverflow中文版ver 2005 using ASP.NET


The most basic using a store procedure, but agree with @TomTom you probably need to get a little info on the subject first.

SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["SQLConnection"].ConnectionString);
SqlCommand cmd = new SqlCommand("Create", con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@Column", SqlDbType.NVarChar).Value = "foo" 
con.Open();
cmd.ExecuteNonQuery();
con.Close();


Head over to http:/www.asp.net/ and read the tutorials there as well as hang around the beginner forum. This gives you a lot more than some code snippet here.

0

精彩评论

暂无评论...
验证码 换一张
取 消