Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Seek() cause 1884 error
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01443714
Message ID:
01443749
Vues:
41
>>>>>>Does anyone know why a seek(value,table,index) would cause a "uniqueness of index" error.
>>>>>>The index is the PK. Table is buffered. I thought the uniqueness error was only if it was being updated.
>>>>>>Isn't the seek just a optimized lookup? The table's PK has a related table.
>>>>>
>>>>>Is the table record-level buffered? If yes, then seek will cause a record movement and if you added a new record, it will try to commit it.
>>>>>
>>>>>Try using INDEXSEEK instead or use table-buffering (buffering = 5)
>>>>
>>>>I do use table-buffering = 5 and I want the pointer to move so I can capture other data related to the found record.
>>>
>>>I think you may want to post some relevant code then.
>>
>>Here is the code:
>>
>>WITH This.Parent
>>IF ! SEEK(This.Value,'contacts','corgcode')
>>       MESSAGEBOX('NO CONTACT FOR THIS ORG CODE EXIST'+CHR(13);
>>	+'PLEASE ENTER NEW INFORMATION';
>>	,64,'UPDATE CONTACT')
>>       llFocus=.F.	
>>ELSE
>>       .txtAddress.Value = ALLTRIM(contacts.cAddress)
>>       .txtCity.Value = ALLTRIM(contacts.cCity)
>>       .txtState.Value = ALLTRIM(contacts.cState)
>>       .txtZip.Value = ALLTRIM(contacts.cZip)
>>       .txtMailSt.Value = ALLTRIM(contacts.cMailSt)
>>       .txtContact.Value = ALLTRIM(contacts.cContact)
>>       .txtPhone_num.Value = ALLTRIM(contacts.cCont_phone)
>>ENDIF	&& seek
>>ENDWITH
>>
>You could use INDEXSEEK() - that doesn't move the pointer....

You miss the point, I need to move the pointer to get to other data in the record found.
Extreme Programming = Plan -> Design -> Code -> Test
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform