2
Answers

will u help me how create web-log site in Asp.net in C#

Photo of jalaluddin khan

jalaluddin khan

16y
2.5k
1
Can anyone help me  to guide me for making Blog site in Asp.net in C#

jalal

Answers (2)

1
Photo of Naresh Joshi
NA 631 252.6k 11y
As referring to your "Select" function it doesn't have any return type that the reason you are getting above error. So to resolve this issue you need to fill the data in Dataset and return the same Dataset  and use it as datasource for your reports.

I have made slight change in the your "Select" function to return dataset :-

public DataSet Select()
{
#region fields
string sqlQuery;
DataSet oDataset = new DataSet();


#endregion


#region SQL Queries
sqlQuery = "SELECT NoNota, Nama, Tanggal, Tipe, Keterangan FROM master";
#endregion


#region execute
if (this.OpenConnection() == true)
{
MySqlCommand cmd = new MySqlCommand(sqlQuery, connect);
MySqlDataAdapter myDataAdapter = new MySqlDataAdapter();
myDataAdapter.SelectCommand = mySqlCommand;
myDataAdapter.Fill(oDataset);
myDataAdapter.Dispose(); 
CloseConnection();
return oDataset 
}
#endregion


}
Accepted