I am using VS2005 and SQL 2005. I am developping an application that has to
connect to a database at SQL 2K5. I am using the emulator to test it. When
the application try to connect to the database, it gives me an exception
(SqlException). This is the code I am using to connect to it, what is wrong?
SqlConnection conn = new SqlConnection("Data Source=SERVER01;Initial
Catalog=ToliWWW;User ID=sa");
SqlDataAdapter Adp = new SqlDataAdapter();
Adp.SelectCommand = new SqlCommand("Select * from Table1", conn);
DataSet DS = new DataSet();
conn.Open();
Adp.Fill(DS, "Table1");
dataGrid1.DataSource = DS;
conn.Close();