Home > Net >  Written vs2013 dataset method system automatically force to the datatable method how to solve
Written vs2013 dataset method system automatically force to the datatable method how to solve

Time:09-30

Protected void the Bind ()
{
SqlConnection myConn=GetConnection ();
MyConn. The Open ();
String myStr="select * from shangjiaguanli";
SqlDataAdapter myDa=new SqlDataAdapter (myStr, myConn);
The DataSet myDs=new DataSet ();
MyDa. The Fill (myDs);
GridView1. The DataSource=myDs;
GridView1. DataKeyNames=new string [] {" ID "};
GridView1. DataBind ();
MyDs. The Dispose ();
MyDa. The Dispose ();
MyConn. Close ();
}

CodePudding user response:

You always in a great god?

CodePudding user response:

If you define an other types of global myDa? Normal SqlDataAdapter the Fill method is a can receive the DataSet of overloaded,

CodePudding user response:

I remember the dataset, datatable can be as a parameter
  • Related