public static DataTable TabloSorgula(string sorgu)
{
DataTable dt = new DataTable();
try
{
Connect();
com.Connection = DataBaseConnection;
com.CommandText = sorgu;
OleDbDataAdapter adp = new OleDbDataAdapter(com);
adp.Fill(dt);
}
catch (Exception ex)
{
throw ex;
}
finally
{
DisConnect();
}
return dt;
}
gridview.datasource = TabloSorgula("Select * from tablo");
gridwiev.dahabind();
Pek işine yaramaz heralde ama ben yazayım dedim.
The Man Who Loved Algorithm&Ubuntu.
www.burakamasyali.com
|