jaya kumar

jaya kumar

  • NA
  • 18
  • 0

dataset ds= new dataset();--type was not found..error

Mar 30 2010 6:45 AM
public SqlConnection conn= new SqlConnection("Data Source=;Initial Catalog=;Integrated Security=SSPI;UserID=sa;Password=;"); ;
public SqlCommand com;
string strSql = "SELECT * FROM SahanaMusical";
conn.Open();
com = new SqlCommand(strSql, conn);
SqlDataAdapter da = new SqlDataAdapter(com);

DataSet ds12 = new DataSet();

da.Fill(ds12, "SahanaMusical");
dataGrid4.DataContext = ds12;
dataGrid4.ItemsSource = ds12.Tables[0].ToString();
conn.Close();
com.Dispose();

Answers (2)