February 25, 2017

Alternate Solutions to Consider

 

Database Type

Connection String Examples

SQL Server 2000 or earlier

"Provider=sqloledb;Data Source=serverName;Initial Catalog=pubs;User Id=sa;Password=assssd;"

SQL Server 2005 & 2008

Server=serverName;Database=pubs;UID=sa;PWD=asssd;

MS Access

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\somepath\mydb.mdb;User Id=admin;Password=;

Paradox

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\myDb;Extended Properties=Paradox 5.x;

Excel

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\MyExcel.xls;Extended Properties="Excel 8.0;HDR=Yes;IMEX=1"

Example select statement:  SELECT * FROM [sheet1$] (worksheet name followed by a "$" and wrapped in "[" "]" brackets.)

Text

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\txtFilesFolder\;Extended Properties="text;HDR=Yes;FMT=Delimited"

DBF/FoxPRo

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\folder;Extended Properties=dBASE IV;User ID=Admin;Password=

Print