alpha paging and data grid??

alpha paging and data grid??

Post by bciarci » Thu, 26 Aug 2004 03:59:21


Can someone please tell me why this is not working??? I used a sample
that I found and it works great with the pubs database, however, as
soon as I change it to the live database, it dies.. I know that all
the columns are there and are correct.. thanks in advance

Source Error:

Line 31: Cmd.Fill(ds,"Attys")
Line 32: MyDataGrid.Datasource=ds.Tables("Attys").DefaultView
Line 33: MyDataGrid.DataBind()
Line 34:
Line 35: End Sub

Stack Trace:


[HttpException (0x80004005): A field or property with the name
'l_name' was not found on the selected datasource.]
System.Web.UI.WebControls.BoundColumn.OnDataBindColumn(Object
sender, EventArgs e) +350
System.Web.UI.Control.OnDataBinding(EventArgs e) +66
System.Web.UI.Control.DataBind() +26
System.Web.UI.Control.DataBind() +86
System.Web.UI.WebControls.DataGrid.CreateItem(Int32 itemIndex,
Int32 dataSourceIndex, ListItemType itemType, Boolean dataBind, Object
dataItem, DataGridColumn[] columns, TableRowCollection rows,
PagedDataSource pagedDataSource) +169
System.Web.UI.WebControls.DataGrid.CreateControlHierarchy(Boolean
useDataSource) +1411
System.Web.UI.WebControls.BaseDataList.OnDataBinding(EventArgs e)
+49
System.Web.UI.WebControls.BaseDataList.DataBind() +23
ASP.alpha_aspx.BindData() in
C:\Inetpub\wwwroot\PepeHazard\teststuff\alpha.aspx:33
ASP.alpha_aspx.Page_Load(Object Source, EventArgs E) in
C:\Inetpub\wwwroot\PepeHazard\teststuff\alpha.aspx:17
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +750
 
 
 

alpha paging and data grid??

Post by Alvin Brun » Thu, 26 Aug 2004 04:22:44

probably the best place to start with this is to read the exception message
and see what it says the problem is. Have you tried that?

--
Regards,
Alvin Bruney
[ASP.NET MVP http://www.yqcomputer.com/ ]
Got tidbits? Get it here... http://www.yqcomputer.com/

 
 
 

alpha paging and data grid??

Post by Brian Ciar » Thu, 26 Aug 2004 05:02:05

I can see that it says 'l_name' was not found on the selected
datasource. After that, I have no clue what the rest means. I have to
apologize. I am very new to .net and unfortunately am forced to learn
this all on my own. l_name is a valid field in the database, and I
believe I have it bound correctly in my datagrid. I'm not sure what
else i am missing.



*** Sent via Developersdex http://www.yqcomputer.com/ ***
Don't just participate in USENET...get rewarded for it!
 
 
 

alpha paging and data grid??

Post by Alvin Brun » Thu, 26 Aug 2004 23:05:17

the jitter seems to think that there is no l_name in Attys table. that's
where you start. check the spelling, check the case, trim the variable for
blanks

--
Regards,
Alvin Bruney
[ASP.NET MVP http://www.yqcomputer.com/ ]
Got tidbits? Get it here... http://www.yqcomputer.com/
 
 
 

alpha paging and data grid??

Post by Brian Ciar » Sat, 28 Aug 2004 05:31:54


Thanks all. It was actually in my SQL script. I fixed it and it works
great now.. thanks for your help

*** Sent via Developersdex http://www.yqcomputer.com/ ***
Don't just participate in USENET...get rewarded for it!