Firedac Error: "[Firedac][DatS]-15. Duplicate row found on unique index."

Hello,

I am using Firedac 8 with Firebird 2.5 on Delphi 2007.

I have a table with an primary index on SIndex (integer),
and an index defined as:
CREATE UNIQUE DESC INDEX idx_Plans_Prj_Id ON Plans (SIndex)

When I open a TADTable without IndexName (so, primary index is used), 
everything works.

When I open the same TADTable with IndexName = 'idx_Plans_Prj_Id'
I get the error message:
"[Firedac][DatS]-15. Duplicate row found on unique index.
Constraint [RDB$PRIMARY11]"
(rdb$primary11 is the primary index of Plans table).

The SIndex is unique by construction, as the idx_Plans_Prj_Id index is 
just a DESCending index on primary key.

There is also no SortOptions.SortLocale or (wide)string sorting problems 
as the index key is just an integer...

So, is that a bug in TADTable component ?
or did I miss something ?

Thanks,
Mel
0
M
4/3/2014 10:51:33 AM
embarcadero.delphi.database 1294 articles. 0 followers. Follow

5 Replies
2671 Views

Similar Articles

[PageSpeed] 54

Try using a TFDQuery instead. TFDTable is not a good design for client 
server applications.

M. E.L. wrote:
> Hello,
>
> I am using Firedac 8 with Firebird 2.5 on Delphi 2007.
>
> I have a table with an primary index on SIndex (integer),
> and an index defined as:
> CREATE UNIQUE DESC INDEX idx_Plans_Prj_Id ON Plans (SIndex)
>
> When I open a TADTable without IndexName (so, primary index is used),
> everything works.
>
> When I open the same TADTable with IndexName = 'idx_Plans_Prj_Id'
> I get the error message:
> "[Firedac][DatS]-15. Duplicate row found on unique index.
> Constraint [RDB$PRIMARY11]"
> (rdb$primary11 is the primary index of Plans table).
>
> The SIndex is unique by construction, as the idx_Plans_Prj_Id index is
> just a DESCending index on primary key.
>
> There is also no SortOptions.SortLocale or (wide)string sorting problems
> as the index key is just an integer...
>
> So, is that a bug in TADTable component ?
> or did I miss something ?
>
> Thanks,
> Mel
>
0
quinn
4/3/2014 7:58:42 PM
> So, is that a bug in TADTable component ?
> or did I miss something ?

http://docwiki.embarcadero.com/RADStudio/XE5/en/Browsing_Tables_(FireDAC)#Avoiding_.22Unique_Key_Violation.22_Error_in_LDW_Mode

-- 
With best regards,
Dmitry Arefiev / FireDAC Architect
0
Dmitry
4/3/2014 10:11:50 PM
On 04.04.2014 00:11, Dmitry Arefiev wrote:
>> So, is that a bug in TADTable component ?
>> or did I miss something ?
>
> http://docwiki.embarcadero.com/RADStudio/XE5/en/Browsing_Tables_(FireDAC)#Avoiding_.22Unique_Key_Violation.22_Error_in_LDW_Mode
>

Well I already read that...
But, as I mentioned, my descending index is on an INTEGER key.
What can do FormatOptions.SortLocale / SortOptions, collation and all 
that stuff for indexing an integer ?

Mel
0
M
4/4/2014 6:19:30 AM
On 03.04.2014 21:58, quinn wildman wrote:
> Try using a TFDQuery instead. TFDTable is not a good design for client
> server applications.

Yes, I know that.
But, in the process to update my application, using TFDTable is a good 
step to start with.

Thanks,
Mel
0
M
4/4/2014 6:24:46 AM
> {quote:title=M. E.L. wrote:}{quote}
> On 04.04.2014 00:11, Dmitry Arefiev wrote:
> >> So, is that a bug in TADTable component ?
> >> or did I miss something ?
> >
> > http://docwiki.embarcadero.com/RADStudio/XE5/en/Browsing_Tables_(FireDAC)#Avoiding_.22Unique_Key_Violation.22_Error_in_LDW_Mode
> >
> 
> Well I already read that...
> But, as I mentioned, my descending index is on an INTEGER key.
> What can do FormatOptions.SortLocale / SortOptions, collation and all 
> that stuff for indexing an integer ?
> 
> Mel


Hi I had a similar situation I am not sure it will work for you  
Format options I made SortLocale to 0 which was by default 1024 and 
sort options made StrsTrim made it to false which was true before it worked for some tables but It did not work for all not sure why this strange behaviour or something I am missing while repeating this settings for other tables
0
Ranjita
4/22/2014 11:44:09 AM
Reply:

Similar Artilces:

Performance Question: "unique constraint" vs. "unique index"
There are two ways to define alternate primary-keys: a) unique constraint b) unique index Is there any difference in performance when: - inserting records - select records using a where-clause on these fields - select records using a join on these fields regards, josef Keep in mind that a "unique index" allows nulls while a unique constraint does not. As such, a unique constraint can be used just like a PKEY but a unique index cannot be. Having said that, there should not be major performance differences between the two. The choice between a constraint and an...

"Access database" and "Login error"
Hey guys,I'm trying to get an Access database to be the location of the username/password combinations. I've done it is as far as I can tell, but I'm now stuck with the following error.These are some of things I have doneSet up the database in ODBC under the name "OdbcServices"Put the database in the "App_data" folder in the website directoryThanks for any help that you guys can give about the error.The Naked Programmer------------------------------------------ Configuration Error Description: An error occurred during the proc...

unique index "trigger_name" on "SYSTRIGGER"
Issue: The unique index "trigger_name" on "SYSTRIGGER" does not include table_id in its key columns definition. This complicates the creation of duplicate sub-schemas owned by different users within a database. I currently embed the table owner in the trigger name in order to circumvent this issue. Question: Will this be addressed in a future release? How can I redefine the index? Will this break "ALTER / DROP TRIGGER" statement processing or does it include the table owner, if specified, in its selection process? I'll assume I'...

"Index would not be unique" error
We are using ASA v9.01.1964 on both consolidated and remotes. I am getting an "Index would not be unique" error when downloading to remote database. I am not sure what is causing this error and will not have access short of running with full verbose mode. This is failing for me on multiple remote users. Is there any way to force remote database to continue after failure of this error instead of halting download completely. Please see partial log below. Thanks, Brian I. 05/19 17:03:08. Download stream: received 347843 bytes from MobiLink Server. I. 05/19 17:0...

"Row Not Found" error
The following has happened to us twice now. If anyone has ideas as to what's happening or can point me to a thread that talks about it, please let me know. We have set up a test bed where one workstation is dedicated to running DBREMOTW in continuous mode, for the consolidated DB. We are also using this workstation to test incremental (transaction log) backups. The backups seem to go without a hitch the first few times, but twice now we have started DBBACKW and it dies, getting about half done and then saying there was an error (sorry, don't remember the exact wording). I...

"error 15: File not found"
I have had a problem with starting up OpenSuse 11 on my laptop. I have two systems UBUNTU and OpenSuse on it but it seems after an OpenSuse update something has changed within "boot" area. On start-up I can see only "error 15: File not found press any key to continue." After doing it I have again an option of choosing Ubuntu or Opensuse and Ubuntu goes well but OpenSuse makes the same error appear. What should I do? -- marcinstawicki ------------------------------------------------------------------------ Seems that something went wrong when grub ...

"The resource cannot be found." error when there is a "dot" at the end of the url
Hi,I'm using ASP .NET MVC Beta and I get the HTTP 404 (The resource cannot be found) error when I use this url which has a "dot" at the end:  http://localhost:81/Title/Edit/Code1.If I remove the dot at the end or the dot is somewhere in the middle I don't get the error. Error details are as follows:I tried to debug but it I get the error from "System.Web.CachedPathData.GetConfigPathData(String configPath)" before ProcessRequest in MvcHandler.Is "dot" not allowed at the end of a url? Or is there a way to fix the route definition to handle this url?Th...

Services don't start automatically ("Database cannot be started -- I/O error" or "Database cannot be started -- No such file or directory")
My situation is: ..server: Windows Server 2003 Standard Edition SP2 ..database server : Adaptive Server Anywhere 8.0.2.4372. Windows starts automatically 32 services ASA, one database in each service If I start each service in manual everything is ok. When I restart the server, four service (always four!!!) don't start correctly with two kind of error: "Database cannot be started -- I/O error" "Database cannot be started -- No such file or directory" The services that don't start are not the same. I tried many times and everytime the problem is on...

Dbeng9 "database server not found" error
I have started dbsrv9 successfully. When I try to use dbeng9 from the workstation machine to connect to that server, I get error "Database server not found". If I start the dbeng on the same machine where the server is started, it works fine. What could be the problem? Thanks Igor Vodov wrote: > I have started dbsrv9 successfully. > When I try to use dbeng9 from the workstation machine to connect to that > server, > I get error "Database server not found". If I start the dbeng on the same > machine where > the server is started,...

"Error 15: File not found" on login
Hi, Firstly, I realise this was posted previously and resolved, but my problem differs slightly. Essentially I ran a full package upgrade and then a distribution upgrade yesterday on a Suse 10 system to bring it up to date. I think it worked out fine, except the boot loader (Grub) reports error 15: file not found on attempted boot. In the other example, the boot loader was configured to look for the now non-existent kernel and i imagine mine is doing the same: the last example was fixed with a live disc that i dont have any more, and i cant make one because i dont have access...

The following is my function which has the same codes....and its showing indexing error in this line..." Dim ddl As DropDownList = CType(gvCategories.Rows(i).FindControl("dropdownlist1"), DropDownList
 In the gridview I given one column as linkbutton. I need to show that if the selected text in one column of the grid is "Done". The following code is working.But I have to visible the "Done" in dropdownlist when it will change itself(its fetching from DB so in the next logging in only it will show. I wrote the same code as function and called it in pageload. but its showing indexing error   The following is the gridview databound code and is executing correctly  Protected Sub gvCategories_DataBound(ByVal sender As Object, ByVal e As System.EventArgs)&...

what is ".index.dat" (DOT)index.dat
hiya, in C:\...\jv16 Power Tools\Backups there are some 2 dozen directories named 001f46,00bb92 etc. Some random 6 digit hex number. Each directory contains 2 files called ".index.dat", note (DOT)index.dat and entries.reg. these are apparently created after using jv16 to clear registry entries. the .index.dat file contains some version of this: [Header] DateTime=8/26/02 4:27:51 PM Text="some program name" TypeCode=1 (or 2 or 3) the entries.reg appears to contain files deleted with the registry cleanup portion of jv16 of "some program name...

.ALLCOL("%COLUMN%", " ", ", ", ", ")
Do you know anyway for me to exclude a subset of columns returned by this function. We have two columns (rec_user and rec_datetime) which are in all of our tables, but when generating triggers I want automatically generate a script which does not include those two columns but does include all other columns in that table. Bruce I should add that I am using PD 9.0.0.580. Bruce "Bruce Lamb" <lamb.bruce@mayo.edu> wrote in message news:6HgI315nCHA.155@forums.sybase.com... > Do you know anyway for me to exclude a subset of columns returned by this > function. ...

Precedence of "where" ("of", "is", "will")?
Nobody on #perl6 today could answer this one. Is: Str | Int where { $_ } the same as: (Str | Int) where { $_ } or: Str | (Int where { $_ }) ? Followup questions, Mr. President: What kind of operators are "where", "of", "is", and "will"? Is there a reason that S03 doesn't list them? What are their precedence(s)? -- Chip Salzenberg - a.k.a. - <chip@pobox.com> Open Source is not an excuse to write fun code then leave the actual work to others. Chip Salzenberg writes: &...

Web resources about - Firedac Error: "[Firedac][DatS]-15. Duplicate row found on unique index." - embarcadero.delphi.database

Resources last updated: 1/22/2016 8:00:58 PM