cmd = New SqlCommand
cmd.Parameters.Add("@Mod", SqlDbType.Int).Value = 4
con.Open()
dr = cmd.ExecuteReader
Db1.DataSource = dr
Db1.DataBind()
なぜ Db1.DataBind() プロパティが機能しないのですか?
cmd = New SqlCommand
cmd.Parameters.Add("@Mod", SqlDbType.Int).Value = 4
con.Open()
dr = cmd.ExecuteReader
Db1.DataSource = dr
Db1.DataBind()
なぜ Db1.DataBind() プロパティが機能しないのですか?
SqlConnection conn=new SqlConnection(your db connestionString);
con.Open()
SqlCommand cmd = New SqlCommand();
cmd.Connection=conn;
//here Iguess you are trying to pass this parameter to sql strored procedure.
//So first set cmd.Commanndtype to sproc
cmd.Parameters.Add("@Mod", SqlDbType.Int).Value = 4
dr = cmd.ExecuteReader
Db1.DataSource = dr
Db1.DataBind()