Duplicate Error
Richard McCoy
mcrmedia1 at insightbb.com
Tue Feb 16 06:17:09 CST 2010
Thanks. That's consistent with what I'm getting. I tested up to a char
length of 110. Looks like this procedure will not work then.
Appreciate the feedback.
----- Original Message -----
From: "Bart Pietercil" <bart.pietercil at cognosis.be>
To: "Valentina Developers" <valentina at lists.macserve.net>
Sent: Tuesday, February 16, 2010 2:57 AM
Subject: Re: Duplicate Error
> The char length is not the problem , but the length the unique index is
> taking in consideration is.
> It stops at 127 (128) char length.
> We've been bitten by this also.
>
> hth
>
> Bart Pietercil
> CTO Cognosis NV
>
>
>
> On 15 Feb 2010, at 20:22, Richard McCoy wrote:
>
>> You're right. It does work in Studio. It also works fine using a regular
>> SQL
>> "Insert" command. But it will NOT work using the API "addRecord()"
>> command.
>> Doing so gives me a duplicate record error every time, consistently,
>> without
>> fail.
>>
>> This is the only problem I've ever experienced with the "addRecord()"
>> commnad. Perhaps it's something I'm doing, but the SQL does work okay.
>>
>> ***Special Note:
>> Some additional testing has yielded this curious result. The
>> "addRecord()"
>> fails on some paths of 132 characters in length. So I tried the same
>> files
>> copied into a different folder with a path of less than 50 characters.
>> The
>> result is that it worked perfectly well. I then tried some different
>> files
>> in a totally different path of at least 132 characters and they failed,
>> but
>> also worked okay in paths of around 50 characters.
>>
>> These results are not random. They happen every time with 100%
>> consistency.
>> All other files work perfectly regardless of path length.
>>
>> My field is set to:
>> VarChar
>> Length = 256
>> Indexed
>> Unique
>>
>> Should I be using some other type? The character length appears to be the
>> problem.
>>
>> Thanks.
>>
>>
>>
>> ----- Original Message -----
>> From: "Ruslan Zasukhin" <ruslan_zasukhin at valentina-db.com>
>> To: "Valentina Developers" <valentina at lists.macserve.net>
>> Sent: Saturday, February 13, 2010 4:46 PM
>> Subject: Re: Duplicate Error
>>
>>
>>> On 2/12/10 4:26 AM, "Richard McCoy" <mcrmedia1 at insightbb.com> wrote:
>>>
>>> Hi Richard,
>>>
>>>> I'm hitting a peculiar problem. Wonder if there's a precedent?
>>>>
>>>> Using Valentina addRecord() function
>>>>
>>>> PathName.value = List item
>>>>
>>>> I set the FilePath field in my database to "Unique" so that a person
>>>> cannot
>>>> add duplicate files. I'm also filtering in code to make sure that no
>>>> duplicates get to the addRecord() code.
>>>>
>>>> Everything works great, except for very specific circumstances. If two
>>>> files
>>>> have a similar path such as this:
>>>>
>>>> D:\Sample Folder\ 11 Caesar.jpg
>>>> D:\Sample Folder\ 11 Augustus.jpg
>>>
>>> This not sounds right.
>>>
>>>> Even though these are two distinct files, Valentina recognizes them as
>>>> having
>>>> precisely the same path and flags that a duplicate record already
>>>> exists.
>>>
>>> I believe that if you will open your db in Vstudio
>>> And try add above 2 values into your unique field,
>>> You will be able do that.
>>>
>>> What TYPE of field?
>>>
>>> May be it is TEXT?
>>> May be flag IndexbyWords is ON for that field ?
>>>
>>>> Changing the second file name to any of these alternatives corrects the
>>>> problem:
>>>>
>>>> D:\Sample Folder\ 11_Augustus.jpg
>>>> D:\Sample Folder\ 10 Augustus.jpg
>>>> D:\Sample Folder\ 12 Augustus.jpg
>>>>
>>>> Since I don't know what a person might name their files, I don't have
>>>> the
>>>> luxury of arbitrarily changing their file names.
>>>>
>>>> Is there a work-around for this?
>>>
>>> --
>>> Best regards,
>>>
>>> Ruslan Zasukhin
>>> VP Engineering and New Technology
>>> Paradigma Software, Inc
>>>
>>> Valentina - Joining Worlds of Information
>>> http://www.paradigmasoft.com
>>>
>>> [I feel the need: the need for speed]
>>>
>>>
>>> _______________________________________________
>>> Valentina mailing list
>>> Valentina at lists.macserve.net
>>> http://lists.macserve.net/mailman/listinfo/valentina
>>
>> _______________________________________________
>> Valentina mailing list
>> Valentina at lists.macserve.net
>> http://lists.macserve.net/mailman/listinfo/valentina
>
>
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina
More information about the Valentina
mailing list