hi ,
this is my connection string :
string strConnection = "Data Source=PROGRAMCO-PC,1433;Initial Catalog=test;User ID=sa;Password=;";
string strCommand = "Select * from tblMosh";
SqlConnection connDB = new SqlConnection(strConnection);
connDB.Open();
tcp/ip in sql server configuration manager is enable!
error :
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, TdsParserState state)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, TdsParserState state)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
at System.Data.SqlClient.TdsParser.Connect(String host, SqlInternalConnection connHandler, Int32 timeout)
at System.Data.SqlClient.SqlInternalConnection.OpenAndLogin()
at System.Data.SqlClient.SqlInternalConnection..ctor(SqlConnection connection, Hashtable connectionOptions)
at System.Data.SqlClient.SqlConnection.Open()
at SmartDeviceProject1.Form1.fillGrid()
at SmartDeviceProject1.Form1.Form1_Load(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form._SetVisibleNotify(Boolean fVis)
at System.Windows.Forms.Control.set_Visible(Boolean value)
at System.Windows.Forms.Application.Run(Form fm)
at SmartDeviceProject1.Program.Main()