Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Tableupdate problems
Message
From
23/03/1999 17:26:27
 
 
To
22/03/1999 21:46:15
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00200774
Message ID:
00201222
Views:
17
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
Phil
_____________________________
Phil Miles
http://www.philmiles.com
phil@philmiles.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform