Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 6 of 6 total |
duplicate records |
Tue, Nov 14 2006 9:55 PM | Permanent Link |
thomas | how can i avoid duplicate records in my table? i have a simple table with 4 fields, can i restrict this option on 2 fields of my table or is there a general
option for the whole table? |
Wed, Nov 15 2006 12:13 AM | Permanent Link |
Jason Lee | Thomas,
Create an index on the table including fields you want to be unique and make sure the Unique attribute of the index is set to True. Regards -- Jason Lee Elk Run Software thomas wrote: > how can i avoid duplicate records in my table? i have a simple table with 4 fields, can i restrict this option on 2 fields of my table or is there a general > option for the whole table? > |
Wed, Nov 15 2006 2:57 AM | Permanent Link |
Thomas | Thanks Jason, i tried as you told me, but i can create the same record a second time.
Finally, for me it's enought, if only one field (in my case is "artigo", that means the style-name) is indexed as unique. but it dont work, its also possible to create the same style-number (artigo) a second time. what about the RecordID, this is also in the index fields, but when i take it away, nothing changed, always i can duplicate the same style-number in my table. Look please on the anexed picture What is RecordHash, this field is also available, but not in the index fields. Thanks Jason Lee <computerguy@wavecable.com> wrote: Thomas, Create an index on the table including fields you want to be unique and make sure the Unique attribute of the index is set to True. Regards -- Jason Lee Elk Run Software thomas wrote: > how can i avoid duplicate records in my table? i have a simple table with 4 fields, can i restrict this option on 2 fields of my table or is there a general > option for the whole table? > Attachments: unique.jpg |
Wed, Nov 15 2006 3:48 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Thomas
Make sure that all the fields you want to be unique and only those are in the index. If you have two fields in the index - style and version and then have in the table artigo v1 artigo v2 artigo v3 artigo v4 These will all be allowed, but if you tried to post another artigo v1 you wouldn't be allowed. This is what you want isn't it? Roy Lambert |
Wed, Nov 15 2006 3:52 AM | Permanent Link |
Jason Lee | Thomas,
Is artigo an integer, a string, or something else? If artigo is the only field indexed, and Unique is true then you should get an error message. If artigo is a string type, then you may want to set the Case-Ins attribute to true also. I just tried a quick sample table like you have and I got the error message. I wouldn't index RecordID or RecordHash in your case, since RecordID will always be unique. Maybe when you altered your index and removed RecordID, the changes didn't take place. If you continue to have a problem with this, post a sample table to the binaries group. Regards -- Jason Lee Elk Run Software Thomas wrote: > Thanks Jason, i tried as you told me, but i can create the same record a second time. > Finally, for me it's enought, if only one field (in my case is "artigo", that means the > style-name) is indexed as unique. > but it dont work, its also possible to create the same style-number (artigo) a second time. > what about the RecordID, this is also in the index fields, but when i take it away, > nothing changed, always i can duplicate the same style-number in my table. > Look please on the anexed picture > What is RecordHash, this field is also available, but not in the index fields. |
Wed, Nov 15 2006 9:55 AM | Permanent Link |
Thomas | Hi Jason, thanks so much for your help, now its working, artigo is a string yes, i put
case-ins on true and took away the recordID from the index. very good! Jason Lee <computerguy@wavecable.com> wrote: Thomas, Is artigo an integer, a string, or something else? If artigo is the only field indexed, and Unique is true then you should get an error message. If artigo is a string type, then you may want to set the Case-Ins attribute to true also. I just tried a quick sample table like you have and I got the error message. I wouldn't index RecordID or RecordHash in your case, since RecordID will always be unique. Maybe when you altered your index and removed RecordID, the changes didn't take place. If you continue to have a problem with this, post a sample table to the binaries group. Regards -- Jason Lee Elk Run Software Thomas wrote: > Thanks Jason, i tried as you told me, but i can create the same record a second time. > Finally, for me it's enought, if only one field (in my case is "artigo", that means the > style-name) is indexed as unique. > but it dont work, its also possible to create the same style-number (artigo) a second time. > what about the RecordID, this is also in the index fields, but when i take it away, > nothing changed, always i can duplicate the same style-number in my table. > Look please on the anexed picture > What is RecordHash, this field is also available, but not in the index fields. |
This web page was last updated on Wednesday, June 12, 2024 at 01:54 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |