Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Checking for duplicate data entered in a grid.
Message
From
11/11/1996 10:24:46
 
 
To
11/11/1996 01:24:41
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00011942
Message ID:
00011959
Views:
25
>Hi. I'm using a grid to enter/update attendance violations by employees. The problem is this:
>I have a primary index on three fields in the violation table: dtos(date)+emp_id+viol_cd (which is entered from a combo box). I do a seek command in the interacive change method of the combo box using the name of the objects on the screen and not the actual table field names. No sysntax error or runtime errors there...
>But when I execute the seek I get "Uniqueness of index violated" or something to thst effect. After some research, I discovered that I should chamge the buffering for the violation table from optimistic record buffering to optomistic table buffering, because when the record pointer moves for the seek, foxpro attempts to save the record when "optimistic record buffering" is used. The problem is that I now get "Uncommitted changes in table 'violation'".

Generally your application flow should support primary key uniqueness. So any time you add new record system has to generate unique key (e.g. sequential Id) which can be part or whole primary index. Doing this way you will never get into troubles.
Edward Pikman
Independent Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform