This is the second project I have recieved this bug. It is of the same natue. I forgot to put a column name in the database (MiscName) and I then refereshed the catalog in LLBLPro. I recompiled the datalayer, removed the references and re-added the references to my main application.
I then get the following message. I have ensured that the column name is visible within LLBLPro UI and I can even insert a new record with that field name as well. It shows up in Intellisense but when I go to retrieve that record it fails:
The field name 'ShowName' isn't known in the element 'ShowsEntity' Parameter name: fieldName
Exception Details: System.ArgumentException: The field name 'ShowName' isn't known in the element 'ShowsEntity' Parameter name: fieldName
Source Error:
Line 190: Dim adapter As New DL.DatabaseSpecific.DataAccessAdapter
Line 191:
Line 192: If (adapter.FetchEntity(Show)) Then
Line 193: Me.ShowName.Text = Show.ShowName
Line 194: Return True
Source File: C:\Inetpub\wwwroot\SbHomeShowSEM\ShowInfo.aspx.vb Line: 192
Stack Trace:
[ArgumentException: The field name 'ShowName' isn't known in the element 'ShowsEntity'
Parameter name: fieldName]
SD.LLBLGen.Pro.ORMSupportClasses.PersistenceInfoProviderBase.GetFieldPersistenceInfo(String elementName, String fieldName)
SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.GetFieldPersistenceInfo(IEntityField2 field)
SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.GetFieldPersistenceInfos(IEntityFields2 fields)
SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchEntity(IEntity2 entityToFetch)
SbHomeShowSEM.ShowInfo.getShowName() in C:\Inetpub\wwwroot\SbHomeShowSEM\ShowInfo.aspx.vb:192
SbHomeShowSEM.ShowInfo.Page_Load(Object sender, EventArgs e) in C:\Inetpub\wwwroot\SbHomeShowSEM\ShowInfo.aspx.vb:59
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
'ShowName' is the new column I added to the table.
Finally, this code works fine with the new column name:
Dim nsrtShow As New DL.EntityClasses.ShowInfoPageEntity
Dim adapter As DL.DatabaseSpecific.DataAccessAdapter
With nsrtShow
.ShowId = CInt(Me.lbl_ShowID.Text)
.Title = Me.Title.Text
.ImgSrc = Me.ImgSrc.Text
.Paragraph = Me.Paragraph.Text
.Footer = Me.Footer.Text
End With
nsrtShow.IsNew = True
adapter = New DL.DatabaseSpecific.DataAccessAdapter
If (adapter.SaveEntity(nsrtShow)) Then Return True