Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Deleting from remote table that has no unique key
Message
De
16/10/1999 18:20:28
 
 
À
16/10/1999 13:43:18
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00277267
Message ID:
00277325
Vues:
24
>I've got a table that frequently has to be zapped and reloaded. That's by design... what the client wants is to download something from the mainframe every morning into a text file and then my program will read in that text file and overwrite the contents of a table with this new information. Since the table is remote I've been using a view to work with it. But none of the three fields in the table is unique.
>
>And I think that's what's causing me a problem. I'll delete one record (in the command window) but when I true to delete the next one or the one after that I get an "update conflict". I think that's probably because the view has already used the key that it thinks is there (because it's required) to delete every record that had "A7" (or whatever) in that field.
>
>I'm thinking my solution is going to have to be to devise a key field and then rewrite my append routine to append the text into the "real" fields and leave the key field alone.
>
>What do you guys think?

You can specify more than one Keyfield in the view designer to make a multifield key. VFP will then include all of the "key" fields in the UPDATE or DELETE statement. Not that I think that that's a good idea.
A better idea would be to create a unique key when you create the table in the first place.
Erik Moore
Clientelligence
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform