Check if you have specified the connection string
VB.NET
dim cn as new SqlConnection(\\'\\')
’dim cn as new OleDdConnection(\\'\\')
C#
SqlConnection cn = new SqlConnection(\\'\\');
OleDbConnection cn = new OleDbConnection(\\'\\');