Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Table without PK - do I need one for View?
Message
 
 
To
25/10/2001 10:03:48
Keith Payne
Technical Marketing Solutions
Florida, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00573010
Message ID:
00573162
Views:
38
>Nadya,
>
>You don't need a PK for an updatable view. Just tag all of the compsite key fields as the key in the view designer. Of course, a PK puts less strain on the database engine and reduces the size of the WHERE clause.
>
>- Keith

Keith,

The problem is: one field in Integer and two other fields are character. Will it work? I want to discuss the possibiities with my manager. One quick related question: Append from doesn't update PK (if it has default value set), right? So, I had to re-write all code to use scan insert endscan instead, if I choose PK route...

Thanks in advance.

>>>>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...)?
>>>
>>>How about giving the table a PK?
>>
>>Yes, I'm thinking, this might be necessary, and also the simplest solution. On the other hand, I now would need to add NextID table, SP, etc. I was hoping, may be there is workaround... Anyway, I just accidentally zaped this table, so adding PK would not be a big problem... :)
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform