title: Link SQL Server Table Into Access
body: <p>I found code here:  <a href="https://stackoverflow.com/questions/625360/update-linked-tables-in-ms-access-database-with-c-sharp-programatically">Update linked tables in MS Access Database with C# programatically</a> That will re-link a table, but how do you actually Link the table and change the name from what it is titled in SQL Server?</p>
  
  <p>I have gotten some pretty rough code started, but am getting hung-up on the parameters...</p>
  
  <pre><code>Microsoft.Office.Interop.Access.Application docacc = new Microsoft.Office.Interop.Access.Application();
  docacc.DoCmd.TransferDatabase(AcDataTransferType.acLink
  </code></pre>
  
  <p>EDIT -- Access 2003 - and I want to link the table from SQL server into access</p>
  
  <p>EDIT # 2
  I found this site: <a href="http://bytes.com/topic/visual-basic-net/answers/379904-create-linked-table" rel="nofollow noreferrer">http://bytes.com/topic/visual-basic-net/answers/379904-create-linked-table</a>
  And have adapted code there, but I get an error of 'unable to establish connection' on my server?</p>