Kevin, Trust me EVERY table has a xx_KEY:
CREATE TABLE [dbo].[depappl] (
[ap_key] [int] IDENTITY (1, 1) NOT NULL ,
)
ON [PRIMARY]
GO
I added it into the Select statement just to passify a need for a key. It bombed without a reference to it too.
__Stephen
--------------------------
>Stephen,
>
>>When I try to use them in a ListBox I bomb out. A reference to a key is the WEB error I get.
>>
>>I see the key in that Select statement identical to the key listed in the BO.
>>public SAE()
>>{
>>this.TableName = "depappl";
>>this.PrimaryKey = "ap_key";
>
>If I understand what you're saying, I think the problem is that you have specified the business object’s TableName as “depappl” and its PrimaryKey as “ap_key”...but ap_key is not a key field in the "depappl" table?
>
>When the Framework tries to retrieve this value, you get the key error. If your table is read only and doesn’t have a primary key, don’t set the PrimaryKey field at all in your business object.R
>
>Regards,