I wrote the code as you said, but it showing two error in sqldataAdapter
1.Argument '1': cannot convert from 'string'to 'System.Data.SqlClient.SqlCommand'
2.The best overloaded method match for 'System.Data.SqlClient.SqlDataAdapter.SqlDataAdapt er
please sought this problem