Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Validation and candidate key
Message
From
25/01/1999 10:18:21
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00179806
Message ID:
00179809
Views:
26
Igor ---

The violation is probably due to having Eff_date ControlSource for the textbox. Therefore, you are setting up a uniqueness error that happens the instant you fire off a Lostfocus or a Valid.

To resolve this, unbind the ControlSource and do a REPLACE eff_Date with THIS.Value *after* you have validated eff_Date.


>Hi,
>
>I have a table:
> Rate_Memb N 12 2
> Eff_date D
>
>Index Eff_date on Eff_date is a candidate index.
>Buffering mode is optimistic table buffering.
>
>Users should enter Rate_memb and Eff_date manually.
>In the textbox Valid event I validate This.Value:
>
>Local lRet
>
>lRet = !Seek(This.Value,"ratememb","eff_date")
>if !lRet
> =MessageBox("Duplicate effective date.",16,"Members rate")
>endif
>
>Return lRet
>
>But On Seek() I got error on uniqness violation.
>
>What are solutions of the problem?
>
>Sincerely.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Previous
Reply
Map
View

Click here to load this message in the networking platform