你在为Margie’s Travel旅行社创建一个ASP.NET应用程序。Margie’s Travel旅行社用Microsoft SQL Server2000 数据库存储关于旅游节目信息。你的应用程序将允许申请用户指定目的地的旅游节目信息。 你想用DataGrid控件把信息显示给用户。你想数据用只读表单显示。 用户的旅游目的地包含在一个名为destinationCode的窗体字符变量里。在你的Page.Load事件处理,你创建了一个名为SqlConnect1的SqlConnection对象,初始化它,调用它的Open()方法。当你的代码执行查询时,你想尽可能快的返回数据。 你定义了下面的局部变量来保留目标代码: Dim dest As String = destinationCode 你应怎么做?(2.0分) A. 创建一个名为GetDestinations存储过程然后用下面代码检索数据: Dim cmd As SqlCommand = _ New SqlCommand(“GetDestinations”, _ sqlConnection1) cmd.CommandType = CommandType.StoredProcedure Dim parm As SqlParameter = _ New SqlParameter(“@DestinationCode”, dest) cmd.Parameters.Add(parm) dim sqlDataReader1 As SqlDataReader = _ cmd.ExecuteReader() B. 创建一个名为GetDestinations存储过程然后用下面代码检索数据: Dim qry As String = _ “EXEC GetDestinations WHERE DestID = “ _ & “’” & dest & “’” Dim da As SqlDataAdapter = _ New SqlDataAdapter (qry, sqlConnection1) Dim ds As DataSet = New DataSet() da.Fill(ds) C. 用下面代码检索数据: Dim qry As String = _ “SELECT * FROM Destinations WHERE DestID = “ _ & “’” & dest & “’” Dim cmd As SqlCommand = _ New SqlCommand(qry, sqlConnection1) cmd.CommandType = CommandType.Text Dim sqlDataReader1 As SqlDataReader = _ cmd.ExecuteReader() D. 用下面代码检索数据: Dim qry As String = _ “SELECT” * FROM Products WHERE DestID = @DestID” Dim cmd As SqlCommand = _ New SqlCommand(qry, sqlConnection1) cmd.CommandType = CommandType.Text Dim parm As SqlParameter = _ New SqlParameter(“@DestID”, dest= cmd.Parameters.Add(parm) Dim SqlDataReader1 As SqlDataReader = _ cmd.ExecuteReader()