开发者

BindingSource Get Column Information

开发者 https://www.devze.com 2023-03-31 20:37 出处:网络
SqlConnection con=new SqlConnection(); SqlDataAdapter adap=new SqlDataAdapter(\"select * from student where Id=-1\",con);
SqlConnection con=new SqlConnection();
SqlDataAdapter adap=new SqlDataAdapter("select * from student where Id=-1",con);
DataSet mydataset=n开发者_高级运维ew DataSet();
adap.Fiil(mydataset,"students");

BindingSource mybindingsource=new BindingSource(mydataset,"students");

Now I create a adapter and fiil it a dataset and create a bindingsource with dataset table There is no item in BindingSource.How can I get ColumnNames in my Query from Bindingsource unless use dataset table??

0

精彩评论

暂无评论...
验证码 换一张
取 消