0
,而不是將我的存儲過程中的輸出參數值返回到我的標籤,它返回默認值,我將輸出參數設置爲。輸出參數到標籤
爲什麼不能我把我的輸出參數爲我的文字標籤
Dim reader As SqlDataReader
cmd.Parameters.AddWithValue("@tour", "2365")
cmd.Parameters.Add("@tourname", SqlDbType.VarChar)
cmd.Parameters("@tourname").Direction = ParameterDirection.Output
cmd.CommandText = "test"
cmd.CommandType = CommandType.StoredProcedure
cmd.Connection = conn
conn.Open()
reader = cmd.ExecuteReader()
Dim myTable As DataTable = New DataTable()
myTable.Load(reader)
DropDownList1.DataSource = myTable
DropDownList1.DataTextField = "ddate7"
DropDownList1.DataBind()
Label1.Text = cmd.Parameters("@tourname").ToString
conn.Close()
只是要說清楚:你是說存儲過程返回一個數據表*和*一個輸出參數? – egrunin 2011-01-10 19:44:26