When connecting to Sql Server from .Net, there are three namespaces containing classes to do so: System.Data.SqlClient / System.Data.OleDb / System.Data.Odbc The one should use is System.Data.SqlClient since this contains functions specific to Sql Server,