MCP certifications

上一篇 / 下一篇  2007-08-31 03:02:43

1.You are creating an ASP.NET MCP certifications  page for the sales department at your company. The page enables users to access data for individual customers by selecting a customer's name. After a customer's name is selected, the page displays a list of that customer's unshipped orders and the total year-to-date (YTD) sales to that customer.

Your company's sales data is stored in a Microsoft SQL Server database. You write a stored procedure  MCP certifications to return the data that you need to display on the ASP.NET page. The stored procedure returns a result set containing the list of unshipped orders, and it returns the YTD sales in a parameter named @YTD.

You write code that uses a SqlCommand object named cmd and a SqlDataReader object named reader to run the stored procedure and return the data. You bind reader to a DataGrid control on your page to display the list of unshipped orders.

You want to display the YTD sales in a Label control named MCP certifications . Which code segment should you use?

A: reader.NextResult()
ytdLabel.Text = cmd.Parameters("@YTD").Value.ToString()
reader.Close()
B: reader.Close()
ytdLabel.Text = reader.NextResult().ToString()
C: reader.Close()
ytdLabel.Text = cmd.Parameters("@YTD").Value.ToString()
D: ytdLabel.Text = cmd.Parameters("@RETURN_VALUE").Value.ToString()
reader.Close()
Correct Answers:  C


相关阅读:

TAG: MCP certifications

 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

日历

« 2008-08-30  
     12
3456789
10111213141516
17181920212223
24252627282930
31      

数据统计

  • 访问量: 1784
  • 日志数: 21
  • 建立时间: 2007-08-22
  • 更新时间: 2008-03-11

RSS订阅

Open Toolbar