<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <CodeSnippet Format="1.0.0">
    <Header>
      <Title>傳回 TableAdapter 查詢的 Output 參數</Title>
      <Author>Microsoft</Author>
      <Description>「不傳回值」的 TableAdapter 方法會使用傳回受影響資料列的 ExecuteNonQuery。這個程式碼片段會從 TableAdapter 上的其中一個命令參數傳回值。</Description>
      <Shortcut>dtNonQueryOutParam</Shortcut>
    </Header>
    <Snippet>
      <Declarations>
        <Literal>
          <ID>methodName</ID>
          <Type>String</Type>
          <ToolTip>取代為您要在 TableAdapter 上公開的新方法名稱。</ToolTip>
          <Default>GetNonQueryOutputParameter</Default>
        </Literal>
        <Literal>
          <ID>existingMethod</ID>
          <Type>String</Type>
          <ToolTip>取代為 TableAdapter 上現有的 ExecuteNonQuery 方法。</ToolTip>
          <Default>GetCustomerCount</Default>
        </Literal>
        <Literal>
          <ID>commandIndex</ID>
          <Type>Int</Type>
          <ToolTip>取代為 TableAdapter _commandCollection 中命令的索引。
提示:  在現有方法上選取 [移至定義]，即可找出索引。</ToolTip>
          <Default>1</Default>
        </Literal>
        <Literal>
          <ID>parameterIndex</ID>
          <Type>Int</Type>
          <ToolTip>取代為您要傳回的參數索引。
提示:  使用 DataSet 設計工具，即可找出 TableAdapter 的查詢上的參數索引。</ToolTip>
          <Default>1</Default>
        </Literal>
        <Object>
          <ID>dataType</ID>
          <Type>System.Object</Type>
          <ToolTip>取代為方法將傳回的 DataType。</ToolTip>
          <Default>Integer</Default>
        </Object>
      </Declarations>
      <Code Language="VB" Kind="method decl"><![CDATA[Public Function $methodName$() As $dataType$
	Me.$existingMethod$()
	Return Me._commandCollection($commandIndex$).Parameters($parameterIndex$).Value
End Function
]]></Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>
