Hello Friends.

Im having a problem in identifying the Provider for my MSSQL Server 2008. Can anyone address me the location of this information because I have to initialize it in my VB.et. As I understand for Ms Access it is something like

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="

Can I know where to find for MSSQL Server 2008. Please. Badly Need it.

Thanks a bunch

Dani AI

Generated

— short answer: when you write VB.NET use the ADO.NET SqlClient provider (no "Provider=" token) instead of the Jet/OLEDB style string. ’s link is helpful for examples, but in code you should prefer System.Data.SqlClient for SQL Server 2008.

A minimal VB.NET example using SqlClient:

Dim connString As String = "Server=MYSERVER;Database=MyDb;Integrated Security=True;"
Using cn As New System.Data.SqlClient.SqlConnection(connString)
    cn.Open()
    ' execute commands...
End Using

If you must use an OLE DB provider (for legacy code or tools that require it), SQL Server 2008 typically installs the SQL Native Client 10.0 provider (provider name SQLNCLI10). Older systems use SQLOLEDB. Example OLE DB form (for legacy ADO/OleDbConnection):

Dim oledbConn As String = "Provider=SQLNCLI10;Server=MYSERVER;Database=MyDb;Uid=sa;Pwd=secret;"

How to find what providers are actually installed on the machine (useful if you get "provider not registered" errors):

Dim dt As System.Data.DataTable = System.Data.OleDb.OleDbEnumerator.GetElements()
For Each r As System.Data.DataRow In dt.Rows
    Console.WriteLine(r("SOURCES_NAME").ToString())
Next

Quick troubleshooting notes: 1) Match bitness — 32 vs 64-bit providers must match your process (use the correct odbcad32.exe). 2) Test connections with a .udl file (create a text file, rename to .udl, double-click and test). 3) Prefer SqlClient for performance and fewer install/runtime issues.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.