using vb.net/asp.net 2005 and SQL Server 2005
In my vb.net code I am setting the select statement for SqlDataSource1 and after that I am setting the DatasourceID for my gridview called grdGV (see below). However no rows are being displayed in the grid and the Rows.Count that I am printing out is 0.
But when I taked the SqlDataSource1.SelectCommand printed out in my response.write statement below and query this in my SQL database I see 2 records being returned. So I am very puzzled why the database will return 2 records but the same exact query that is set in the SqlDataSource and then bound to the grid does not return 2 records?
I have also checked the DataSource.ConnectionString and it matches the database I am using.
Has anyone seen this before or have any ideas? thanks
grdvGV.DataSourceID = "SqlDataSource1"
grdvGV.DataBind()
Response.Write(SqlDataSource1.SelectCommand &am ...
Go to the complete details ...