title: How to connect to database using ODBC DSN without ID and password in ASP.Net
body: <p>When I configured my ODBC DSN, Why do I need to set parameters of ODBC connection string -User-ID &amp; Password- again? using Sql Server Driver.</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.ComponentModel;
  using System.Data;
  using System.Drawing;
  using System.Linq;
  using System.Text;
  using System.Windows.Forms;
  using System.Data.Odbc;
  using Microsoft.Win32;
  
  namespace ODBC
  {
      public partial class Form1 : Form
      {
          OdbcConnection conn = new         OdbcConnection("Dsn=MyDSN;Uid=***;Pwd=****;");
          public Form1()
          {
              InitializeComponent();
          }
  
          private void button1_Click(object sender, EventArgs e)
          {
              string query = "select top 1 " + comboBox4.SelectedItem + " from " + comboBox3.SelectedItem + "  ORDER BY " + comboBox4.SelectedItem + " DESC";
              OdbcCommand cmd = new OdbcCommand(query, conn);
              conn.Open();
              ...
          }
      ...
      }
  ...
  }
  </code></pre>