When I access a BOs PK Field I just get Guid.empty


Author
Message
Peter Denton
Peter Denton
StrataFrame User (147 reputation)StrataFrame User (147 reputation)StrataFrame User (147 reputation)StrataFrame User (147 reputation)StrataFrame User (147 reputation)StrataFrame User (147 reputation)StrataFrame User (147 reputation)StrataFrame User (147 reputation)StrataFrame User (147 reputation)
Group: Forum Members
Posts: 77, Visits: 787
G'day

I've have a BO that I'm programatically instantiating, and filling with a stored procedure. The stored procedure only returns a single row of the SQL Server 2005 table to which it relates. What I want to do is use the Primary Key of this BO as a parameter to a stored procedure that will fill another BO (that I will also instantiate programatically) with selected records (filtered on foreign key). These BOs contain Application configuration Data and there will be no user interaction it, which is why I'm not dropping it on a form.

The Primary Key I'm trying to access is a guid. When I set a break in Visual Studio and look at the contents of the BO I see that the CurrentDataTable has a single row, and there are values in all the columns, similarly for the CurrentView, but when I look at the DTGID property (the primary key) I see the value of Guid.empty. I looked at the other columns/properties and saw that they all had the values as shown in the CurrentDataTable except for three others that contain guids which show guid.empty.

I think I have come across this before when I had a BO dropped on a form, but gave up and moved on with something else.

Does anyone have an explanation or suggestion on how to get around this?

Peter

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search