Monday, March 26, 2012

why my simple code Vs.net2003 says something wrong? how can i correct it?

only a very simple code,below:

public void db_binddata()
{
string sql = "select * from category ";

DataSet C1 = newdata.dbbind(sql);
DataTable mytable;
mytable = C1.Tables[0].DefaultView;

}

vs.net2003 says here errors tookplace:

C:\Inetpub\wwwroot\upload_images\test_dataset_datatable.aspx.cs(59): ???"System.Data.DataView"???"System.Data.DataTable"

and this sentense"

mytable = C1.Tables[0].DefaultView;
"wrong,why?You need to execute your sql string
i have already resolve this problem!

0 comments:

Post a Comment