Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
COUNT caused Uniqueness of Index Violation?
Message
 
 
To
29/10/1997 03:48:52
Shihchau Tai
Apic Systems Pte Ltd
Singapore, Singapore
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00057154
Message ID:
00057319
Views:
24
>>>I have master-detail form with both master and detail tables on table buffered mode. Both of them are put on grid. After I issue a COUNT TO ... (or CALCULATE XXX()) on the child table and when I start appending new record, I will get Uniqueness of Index Violation on my child table's primary key. The primary key is generated from NEWID function (tastrade) and I can't imagine how it can go wrong.
>>>
>>>Is it a bug in VFP? Anyone has encountered such thing before? I suspect having two table-buffered grids will cause such problem.
>>>
>>>Any opinion?
>>>
>>>Thanks in advance.
>>
>>Hi Tai,
>>I don't know if I got the problem , but why don't you use an Insert SQL statement instead of append ?
>>I think it will give you no problem.
>> HTH
>>Alessio
>
>Hi! I didn't want to code INSERT INTO the primary key field and the NEWID() function in my program. It will make the program harder to maintain.
>
>Anyway, I found that my problem would go away if I removed 'DODEFAULT()' in the grid refresh. It is strange... Isn't it?

Hi Tai,
I have been fighting a simular circumstance. My one-to-many
Parent-Child ADD CHILD routine! I ended up rewriting the
Add routine and bypassing the RI code - this is NO FUN a lot of coding.
I've only had this problem since incorporating a Paramitized View.
I couldn't get around "Child is not unique", 8~(
Time limitations - so I did it the hard way CODE .~|
I'll look into that DODEFAULT ...

Have a Nice Day - Ed B
Edgar L. Bolton, B.S. B.B.A.
Previous
Reply
Map
View

Click here to load this message in the networking platform