Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
APPEND BLANK to cursor, CANDIDATE INDEX, index violation
Message
 
 
To
24/04/2008 13:02:35
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01312895
Message ID:
01312916
Views:
19
>>I can always APPEND BLANK one record to the cursor without an error. I then populate that record with values, in particular with GroupID and VisitID. If GroupID = 1, I can append additional records, populating each one before appending the next one without errors. However, if GroupID = 2, I can APPEND one record. When I attempt the next APPEND BLANK it triggers the index uniqueness violation error.
>
>Jim - try putting the index key expression into the Watch window and see what the value is when you succeed and when you fail.
>
>Tamar

Tamar,

I have done that. The index key is 8 chars. In the watch window, I display the ascii code for each of the 8 chars. They are truly different. For example, when GroupID = 1, and VisitID = 1, the index expression evaluates to 128,0,0,1,128,0,0,1. The GroupID value sets the 4th value in the sequence. The VistiID value sets the 8th value in the sequence. And, this is pretty consistent.

Thanks for your input on this.

My suspicion is that something I am doing is leaving a blank record that causes the next APPEND BLANK to trigger the uniqueness error. But I haven't found it yet.

While stepping through this under the debugger, I am monitoring the cursor. Certainly there is no blank record when I start. And, I have not yet found the cirumstances under which I could leave one behind. But, I suspect that is where my problem is.

Jim
Previous
Reply
Map
View

Click here to load this message in the networking platform