Hello,
I have the following typedview which joins on quite a few look up tables
When data binding to this in visual studio 2005 (ASP.net version 2), I'm getting some really strange errors
SELECT TOP (100) PERCENT dbo.t_Mortgage.status, dbo.t_Mortgage.ID, dbo.t_Customer.email, dbo.t_Mortgage.whatpage, dbo.t_Mortgage.qtimestamp,
dbo.t_QuoteStatus.Name AS quotestatusname, dbo.t_Customer.firstname, dbo.t_Customer.lastname, dbo.t_Mortgage.nationality,
dbo.t_Mortgage.phone, dbo.t_Mortgage.otherbroker, dbo.t_Mortgage.facetoface, dbo.t_Mortgage.origin, dbo.t_Mortgage.version,
dbo.t_Mortgage.Createdagent, dbo.t_Mortgage.AssignedAgent, dbo.t_Mortgage.Createdbranch, dbo.t_Mortgage.qualagent, dbo.t_Mortgage.qualbranch,
dbo.t_Mortgage.DateAssigned, dbo.t_Mortgage.AssignedBranch, dbo.t_Mortgage.whenfor, dbo.t_Mortgage.lastupdated, dbo.t_Customer.title,
dbo.ws_Agent.Name AS assignedagentname, ws_Agent_1.Name AS createdagentname, ws_Agent_2.Name AS qualagentname,
dbo.t_Mortgage.customerid, dbo.ws_Branch.Name AS createdbranchname, ws_Branch_2.Name AS qualbranchname,
ws_Branch_1.Name AS assignedbranchname
FROM dbo.t_Mortgage INNER JOIN
dbo.t_QuoteStatus ON dbo.t_Mortgage.status = dbo.t_QuoteStatus.QuoteStatusId INNER JOIN
dbo.ws_Agent ON dbo.t_Mortgage.AssignedAgent = dbo.ws_Agent.AgentId INNER JOIN
dbo.ws_Agent AS ws_Agent_1 ON dbo.t_Mortgage.Createdagent = ws_Agent_1.AgentId INNER JOIN
dbo.ws_Agent AS ws_Agent_2 ON dbo.t_Mortgage.qualagent = ws_Agent_2.AgentId INNER JOIN
dbo.ws_Branch AS ws_Branch_1 ON dbo.t_Mortgage.AssignedBranch = ws_Branch_1.BranchId LEFT OUTER JOIN
dbo.ws_Branch AS ws_Branch_2 ON dbo.t_Mortgage.qualbranch = ws_Branch_2.BranchId LEFT OUTER JOIN
dbo.ws_Branch ON dbo.t_Mortgage.Createdbranch = dbo.ws_Branch.BranchId LEFT OUTER JOIN
dbo.t_Customer ON dbo.t_Mortgage.customerid = dbo.t_Customer.ID
When initially data binding (to a form view in this case) I'm getting extra rows such as
Rowerror, haserrors, table?
I'm also getting at runtime messages saying a particular field is not present (details view) when it is clearly present at design time when looking at the bound fields, I have rebuilt everything many times.
On the design view for a gridview I'm getting the following error
there was an error in rendering this control.
data binding. system.data.datarowview does not contain a property with the name Id (which it does)
Is there something obvious I am doing wrong to cause this in the way I have set up my view?
Regards,
Matthew