Hello Friends,
can we convert int to datatable .
I am getting the result in int, but i am not able to assign that result to my datatable. How to achieve this?
public DataTable LoadAll()
{
DataTable table = new DataTable();
string sql = "SELECT name FROM master..sysdatabases";
int result = SqlHelper.ExecuteNonQuery(SqlServerHelper.connStr, CommandType.Text, sql, null); // here i am getting the result in integer, i want to covert it to datatable.
return table;
}
Please help me this.
Thanks