<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <CodeSnippet Format="1.0.0">
    <Header>
      <Title>SQL Express'e yerel SQLConnection oluştur</Title>
      <Author>Microsoft</Author>
      <Description>Kullanıcı Örneği = True kullanarak SQL Express Bağlantısı için tipik bağlantı ad/değer çifti için SQL Bağlantısı sağlanan yer değiştirmeleri oluşturur</Description>
      <Shortcut>adoCreateSqlExpConn</Shortcut>
    </Header>
    <Snippet>
      <References>
        <Reference>
          <Assembly>System.Data.dll</Assembly>
        </Reference>
        <Reference>
          <Assembly>System.Xml.dll</Assembly>
        </Reference>
      </References>
      <Imports>
        <Import>
          <Namespace>System.Data</Namespace>
        </Import>
        <Import>
          <Namespace>System.Data.SqlClient</Namespace>
        </Import>
      </Imports>
      <Declarations>
        <Literal>
          <ID>dataBaseName</ID>
          <Type>String</Type>
          <ToolTip>Bunu, veritabanının dosya adıyla değiştirin.</ToolTip>
          <Default>Northwind</Default>
        </Literal>
        <Literal>
          <ID>dataDirectory</ID>
          <Type>String</Type>
          <ToolTip>Click Once öğesinin bir parçası olarak oluşturulan DataDirectory öğesini kullanmak için, |DataDirectory| makrosunu kullanın. Eğer belirli bir dizini kullanmak istiyorsanız makroyu değiştirin</ToolTip>
          <Default>|DataDirectory|</Default>
        </Literal>
        <Object>
          <ID>conn</ID>
          <Type>SqlConnection</Type>
          <ToolTip>Bunu, bağlantı nesnesinin adıyla değiştirin.</ToolTip>
          <Default>conn</Default>
        </Object>
      </Declarations>
      <Code Language="VB" Kind="method body"><![CDATA[Dim $conn$ As New SqlConnection()
$conn$.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=$dataDirectory$\$dataBaseName$.mdf;Integrated Security=True;User Instance=True"
]]></Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>
