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

Thanks for the reply. No there are no other TABLEUPDATE() to confuse the program. I know that if you move the record pointer in the currently buffered view, then the record will be written to the base table without issuing a TABLEUPDATE(), but it also appears that if the record pointer is moved in the base table (not the view) then the record is "sometimes" being updated.

Yesterday I entered about 30 new records OK, today I went to enter only 1 new record and the problem occurred.

Once again thanks

Regards
Doug Johnston



>Hi Doug,
>
>Shot in the dark here, but are you issuing a TABLEUPDATE() anywhere when the view is the current alias?
>
>Phil
>
>>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform