The SQL Server Data Provider

Of course we first look at the flagship, SQL Server provider. A typical Connection string SQL Server looks like this:

provider=SQLOLEDB;data source=EM_SERVER\VSdotNET;initial 
catalog=eLandBill;password=svcslave;persist security info=true;user 
id=sa;workstation id=EM_SERVER;packet size=4096 

Note that if we were using the SqlConnection class the Provider=SQLOLEDB element would not be used. Also if an element (or property) is missing it will use the default setting. We’ve already gone over most of these settings (when we looked at the Data Link Properties page). Just for completeness, I’ll summarize them again here:

  1. Provider— This is the name of the OLEDB data provider, in this case SQLOLEDB is the name of SQL Server ...

Get ADO.NET Programming in Visual Basic™ .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.