title: [Microsoft][ODBE Driver Manager] Data source name too long error in Excel
body: <p>I have code that i took from a video on Youtube and adapted to my needs and i keep getting a Help with a &quot;[Microsoft][ODBE Driver Manager] Data source name too long&quot; error. I don't know why, I'm using the same code except for the file path. If someone could let me know what I'm doing wrong that would be awesome. I'm pretty much trying to make it so multiple people can update a workbook without being in it so i can avoid making it a Sharepoint.
  Here is a sample of the code:</p>
  <pre><code>Sub SyncFromDatabase()
  LastLocalChange = Sheet1.Range(&quot;B8&quot;).Value
  DbFile = Sheet1.Range(&quot;V7&quot;).Value 'Staff Database location
  
  Set objFSO = CreateObject(&quot;Scripting.FileSystemObject&quot;)
  Set objFile = objFSO.GetFile(DbFile)
  
  If objFile.DateLastModified &gt; LastLocalChange Then 'Database Change was 
  made, Update Local Datebase
  'Check Last Database Update
  Set objConnection = CreateObject(&quot;ADODB.Connection&quot;)
  Set objRecordset = CreateObject(&quot;ADODB.Recordset&quot;)
  
  objConnection.Open &quot;Provide=Microsoft.ACE.OLEDB.12.0;&quot; &amp; &quot;Data 
  Source=&quot; &amp; DbFile &amp; &quot;;Extended Properties=&quot;&quot;Excel 12.0 
  Xml;HDR=Yes;IMEX=0&quot;&quot;;&quot; '&lt;---This is where i'm getting the error
  
  objRecordset.Open &quot;Select * From [StaffDb$]&quot;, objConnection 
  ',adOpenStatic ',adLockOptimistic ',adCmdText
  Sheet2.Range(&quot;A2&quot;).CopyFromRecordset objRecordset
  objRecordset.Close
  objConnection.Close
  
  RefreshStaffTable ' Update Contact Table
  End If
  
  End Sub
  </code></pre>
  <p>Any help would be appreciated, thanks.</p>