需要初始化DataAdapter.SelectCommand属性。

问题描述:

DataAdapter.SelectCommand属性需要初始化。



这是什么意思?

The DataAdapter.SelectCommand property needs to be initialized.

What dows this mean?

This is because the codes below is initialized with a null object actually.
like this one 




SqlDataAdapter yourdataAdapterName = new SqlDataAdapter();




Instead of using that you need to initialize the DataAdapter with a command object like below:







 SqlDataAdapter yourdataAdapterName = new SqlDataAdapter("select * from aTable",Conn);
//Conn is your connection string
//use your select command in the place of "select * from aTable"







If it is not your solution then show some code.And ask again