title: Specify a default driver for ODBC
body: <p>I have a legacy VB6 app which builds a DSN based on a parameter in a config file.  The parameter is an ODBC connection, and the connection has a name (DSN-NAME) which maps a server (DBSERVER) to a driver ("SQL Server Native Client").</p>
  
  <p>Generally, it builds a DSN like this:</p>
  
  <blockquote>
    <p>DSN=DSN-NAME;User=foo;Password=bar</p>
  </blockquote>
  
  <p>If I specify a hostname in the file, it builds a connection string which says </p>
  
  <blockquote>
    <p>DSN=DBSERVER;User=foo;Password=bar</p>
  </blockquote>
  
  <p>The error message reported is:</p>
  
  <blockquote>
    <p>[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified</p>
  </blockquote>
  
  <p>This suggests to me that there is perhaps a way of specifying a default driver, which may mean I can specify just the server name in the config file, and not need to create the ODBC connection.</p>
  
  <p>(I am aware these can be created automatically; this is just to simply installation, and to satisfy my curiosity).</p>
  
  <p>How do you specify a default driver?  If I can set the default driver to SQL Server Native Client, can I then say DSN=DBSERVER and connect?</p>
  
  <p><strong><em>Edit:</em></strong> the point was to try and do this without changing the connection string.  All the research suggested this isn't actually possible, but he wording of the dialog suggested it might be.</p>