title: Import DBF files into Sql Server
body: <p>I need a little help figuring this out because I'm new to stored procedures. I am trying to import a .DBF table into Sql Server 2008 using this store procedure.</p>
  
  <pre><code>CREATE PROCEDURE spImportDB
  -- Add the parameters for the stored procedure here
  
  AS
  BEGIN
  
  -- Insert statements for procedure here
  
   SELECT * into Products
   FROM OPENROWSET('vfpoledb','C:\Users\Admin\Doc\Data\DBF',
   'SELECT * FROM MyTable')
  
  END
  GO
  </code></pre>
  
  <p>I receive this error.
  The OLE DB provider "vfpoledb" has not been registered.This isn't true, I've installed it and it works fine in my other application.</p>
  
  <p>I've also tried running it this way with this provider but I receive this error message
  Cannot initialize the data source object of OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)".  </p>
  
  <pre><code>CREATE PROCEDURE spImportDB
  -- Add the parameters for the stored procedure here
  
  AS
  BEGIN
  
  -- Insert statements for procedure here
  
   SELECT * into Products
   FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0','C:\Users\Admin\Doc\Data\DBF',
   'SELECT * FROM MyTable')
  
  END
  GO
  </code></pre>
  
  <p>What's the easiest way to create this stored procedure? I want it to be a stored procedure not a wizard or program so please don't give me any programs.</p>