D
davefromalbury
I have a gridview connected to a objectdatasource. Can't for the life
of me get it to display anything though, always appears empty. The
dataset always seems to be filled with records, as the variable "x"
always equals the number of records i expected. The business object
select command:
public static DataSet Select()
{
DataSet dataSet = new DataSet();
SqlDataAdapter dataAdapter = new SqlDataAdapter();
dataAdapter.SelectCommand=new SqlCommand( "SELECT
category,id FROM categories");
dataAdapter.SelectCommand.Connection = new
SqlConnection(ConfigurationManager.ConnectionStrings["IssueTrackerConnectionString"].ConnectionString);
dataAdapter.SelectCommand.CommandType = CommandType.Text;
int x = dataAdapter.Fill(dataSet);
return dataSet;
}
CANNOT figure out what's happening. Any ideas?
Cheers
dave
of me get it to display anything though, always appears empty. The
dataset always seems to be filled with records, as the variable "x"
always equals the number of records i expected. The business object
select command:
public static DataSet Select()
{
DataSet dataSet = new DataSet();
SqlDataAdapter dataAdapter = new SqlDataAdapter();
dataAdapter.SelectCommand=new SqlCommand( "SELECT
category,id FROM categories");
dataAdapter.SelectCommand.Connection = new
SqlConnection(ConfigurationManager.ConnectionStrings["IssueTrackerConnectionString"].ConnectionString);
dataAdapter.SelectCommand.CommandType = CommandType.Text;
int x = dataAdapter.Fill(dataSet);
return dataSet;
}
CANNOT figure out what's happening. Any ideas?
Cheers
dave