>Hi everybody,
>
>I have a table, which doesn't have a PK. I'd like to make an updatable local view based on this table. Do I need to make a PK? Can I use composite key, like bintoc(DsID)+extryear+extrweek (which should be unique...)?
>
>Thanks in advance.
Nadya,
You don't need a PK but you do need to make some designation of what constitutes a unique record. VFP uses this combination when it constructs the WHERE clause in the SQL Update statement.
In the View Designer, check off all fields that would make the record unique. Also, AFAIK, if using the designer, you have to have fields that are already in the view. You can add the BINTOC() function in the field list and use it as one of the key fields in the Update Criteria tab. Of course, if creating the view using code, you can simply use the BINTOC() in the WHERE clause directly without including it in the view.
HTH.
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao