Tuesday, 10 September 2013

#EANF#

#EANF#

MyCode:
private DataTable GetData(string query)
{
SqlCommand comm = new SqlCommand(query, con);
DataTable tb = new DataTable();
con.Open();
SqlDataAdapter adpt = new SqlDataAdapter(comm);
adpt.Fill(tb);
adpt.Dispose();
con.Close();
return tb;
}

I'm trying to use this function to pass Datatable after called
But i can't pass it to my table
How should I use this correctly?

No comments:

Post a Comment