Author: Meltdown | Posted on: 9/22/2009 5:06:08 AM | Views : 825

Hi all, I'm trying to fill a gridview with my code below, but I keep getting the following error: "A field or property with the name 'BlogID' was not found on the selected data source" ...but BlogId is there in the table!...when I copy an paste my sql line into sql server and run it, it returns the expected data. Anyone know what's going on here? Thanks Melt string gvString; gvString = "SELECT dbo.CblogsMain.BlogID, dbo.CblogsMain.RegID, dbo.Registrations.Username, dbo.CblogsMain.BlogTitle,"; gvString += " CONVERT(varchar,dbo.CblogsMain.CreatedDate, 102) AS CreatedDate, dbo.CblogsMain.InActive"; gvString += " FROM dbo.CblogsMain INNER JOIN"; gvString += " dbo.Registrations ON dbo.CblogsMain.RegID = dbo.Registrations.RegID"; gvString += " WHERE (dbo.CblogsMain.InActive = 0)"; Response.Write(gvString.ToString()); this.GridView1.Da ...

Go to the complete details ...