Web Design that taps into the haromny and vision of your dreams.

ADO.Net Connection Strings

Get connected with these ADO.Net Connection Strings

Written By on in C#

109 words, estimated reading time 1 minutes.

This cheetsheet contains a few of the more common connection strings for connecting ADO.Net to data sources other than SQL Server. It contains connection strings for MySql, Access, Excel, CSV and a few other files.

Microsoft SQL Server File (local)

Data Source=(local); Initial Catalog=DatabaseName; Integrated Security=SSPI

Microsoft SQL Server (server)

Server=(hostname); Database=DatabaseName; Trusted_Connection=Yes

Active Directory Service (OLEDB)

Provider=ADSDSOObject; User Id=username; Password=password

Microsoft JET (Access) (OLEDB)

Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:somepathfilename.mdb
Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:somepathfilename.mdb; Jet OLEDB:Database Password="MyDbPassword"

Microsoft Excel XLS

Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:somepathfilename.xls; Extended Properties="Excel 8.0;HDR=Yes"


Please see the tutorial Connecting ASP.Net to MySql.

IBM DB2 / AS400 / iSeries

Please see the tutorial series Querying iSeries DB2 with ADO.Net.

Last updated on: Friday 23rd June 2017



There are no comments for this post. Be the first!


Leave a Reply

Your email address will not be published.

If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.

Copyright © 2001-2018 Tim Trott, all rights reserved. Web Design by Azulia Designs

This web page is licensed for your personal, private, non-commercial use only.

Disclaimer, Privacy & LegalSitemapContact Me