General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
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
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only