Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Tableupdate problems
Message
De
22/03/1999 21:46:15
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Tableupdate problems
Divers
Thread ID:
00200774
Message ID:
00200774
Vues:
43
Hi,

I have a views DBC that contains 6 views of tables which are contained in a tables DBC. One of these views is vContacts which gets its information from cp!contacts. I use buffering mode 3 for everything.

When I add a new record, that is append a blank in vContacts, I get to the Last_Name field where in the valid I process...

IF thisform.llAdding = .t. AND !EMPTY(vContacts.last_name)
SELECT idnum,title,first_name,last_name,company,address1 FROM cp!contacts WHERE contacts.first_name = vContacts.first_name AND contacts.last_name = vContacts.last_name INTO CURSOR mycursor ORDER BY idnum

IF RECCOUNT() > 0
?? CHR(7)
=MESSAGEBOX('This appears to be a duplicate record. If this is the case, save this record, do a search on last name and view from the List window!',0+48,'&gcMessage')
ENDIF
USE
SELECT vContacts
ENDIF
(looking for suspect duplicates - if the select is empty then no likely duplicates)

Sometimes (not all times) for reasons unknown to me this valid will actually write the partially completed vContacts record to the base table. The same happens when I reach the valid for the Company name field, using similar select to above. I then have two incomplete records added to my base table.

All this time, the record pointer hasn't moved in the vContacts file.

Any help greatly appreciated.

Regards
Doug Johnston
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform