数据绑定
Sub BindData
Dim myConnection As SqlConnection
myConnection=New SqlConnection("Server=LocalHost;uid=sa;pwd=;Database=pubs")
myCommand=New SqlCommand("Select id From emt Where BigType=@BigType ",myConnection)
myCommand.Parameters.Add(New SqlParameter("@BigType",SqlDbType.nVarChar,100))
myCommand.Parameters("@BigType").Value=BigType
myConnection.Open()
DataList1.DataSource=myCommand.ExecuteReader()
DataList1.DataBind()
myConnection.Close()