TMS Xdata Web Application - Duplicates not allowed

I have created a new project and followed the wizard/wizard for the TMS WDATA Web Application.

Every thing looks fine during the Wizard process, but when I'm trying to run/compile the project, Delphi comes up with an fatal error "Duplicates not allowed."

I can see that the fist part of the .pas files are the same as in the last part in the message view of Delphi.

Checking project dependencies...
Compiling WebApp.dproj (Debug, Win32)
App.Config.pas(1): Preprocessor: C:\Users\xx\ODrive\Delphi\Freezer\NewVersion\WebApp\core\App.Config.pas
App.Types.pas(1): Preprocessor: C:\Users\xx\ODrive\Delphi\Freezer\NewVersion\WebApp\core\App.Types.pas
Auth.Service.pas(1): Preprocessor: C:\Users\xx\ODrive\Delphi\Freezer\NewVersion\WebApp\core\Auth.Service.pas
Dataset.Plugins.pas(1): Preprocessor: C:\Users\xx\ODrive\Delphi\Freezer\NewVersion\WebApp\core\Dataset.Plugins.pas
Grid.Plugins.pas(1): Preprocessor: C:\Users\xx\ODrive\Delphi\Freezer\NewVersion\WebApp\core\Grid.Plugins.pas
Grid.Settings.pas(1): Preprocessor: C:\Users\xx\ODrive\Delphi\Freezer\NewVersion\WebApp\core\Grid.Settings.pas
Paginator.Plugins.pas(1): Preprocessor: C:\Users\xx\ODrive\Delphi\Freezer\NewVersion\WebApp\core\Paginator.Plugins.pas
Crud.Utils.pas(1): Preprocessor: C:\Users\xx\ODrive\Delphi\Freezer\NewVersion\WebApp\core\Crud.Utils.pas
ConnectionModule.pas(1): Preprocessor: C:\Users\xx\ODrive\Delphi\Freezer\NewVersion\WebApp\ConnectionModule.pas
View.UserProfile.pas(1): Preprocessor: C:\Users\xx\ODrive\Delphi\Freezer\NewVersion\WebApp\View.UserProfile.pas
View.ErrorPage.pas(1): Preprocessor: C:\Users\xx\ODrive\Delphi\Freezer\NewVersion\WebApp\View.ErrorPage.pas
View.Login.pas(1): Preprocessor: C:\Users\xx\ODrive\Delphi\Freezer\NewVersion\WebApp\View.Login.pas
View.Main.pas(1): Preprocessor: C:\Users\xx\ODrive\Delphi\Freezer\NewVersion\WebApp\View.Main.pas
View.Home.pas(1): Preprocessor: C:\Users\xx\ODrive\Delphi\Freezer\NewVersion\WebApp\View.Home.pas
View.Kategori.List.pas(1): Preprocessor: C:\Users\xx\ODrive\Delphi\Freezer\NewVersion\WebApp\View.Kategori.List.pas
View.Kategori.Edit.pas(1): Preprocessor: C:\Users\xx\ODrive\Delphi\Freezer\NewVersion\WebApp\View.Kategori.Edit.pas
View.Items.List.pas(1): Preprocessor: C:\Users\xx\ODrive\Delphi\Freezer\NewVersion\WebApp\View.Items.List.pas
View.Items.Edit.pas(1): Preprocessor: C:\Users\xx\ODrive\Delphi\Freezer\NewVersion\WebApp\View.Items.Edit.pas
View.Home.List.pas(1): Preprocessor: C:\Users\xx\ODrive\Delphi\Freezer\NewVersion\WebApp\View.Home.List.pas
View.Home.Edit.pas(1): Preprocessor: C:\Users\xx\ODrive\Delphi\Freezer\NewVersion\WebApp\View.Home.Edit.pas
View.Placering.List.pas(1): Preprocessor: C:\Users\xx\ODrive\Delphi\Freezer\NewVersion\WebApp\View.Placering.List.pas
View.Placering.Edit.pas(1): Preprocessor: C:\Users\xx\ODrive\Delphi\Freezer\NewVersion\WebApp\View.Placering.Edit.pas
View.UOM.List.pas(1): Preprocessor: C:\Users\xx\ODrive\Delphi\Freezer\NewVersion\WebApp\View.UOM.List.pas
View.UOM.Edit.pas(1): Preprocessor: C:\Users\xx\ODrive\Delphi\Freezer\NewVersion\WebApp\View.UOM.Edit.pas
View.Kunde.List.pas(1): Preprocessor: C:\Users\xx\ODrive\Delphi\Freezer\NewVersion\WebApp\View.Kunde.List.pas
View.Kunde.Edit.pas(1): Preprocessor: C:\Users\xx\ODrive\Delphi\Freezer\NewVersion\WebApp\View.Kunde.Edit.pas
View.Beskrivelse.List.pas(1): Preprocessor: C:\Users\xx\ODrive\Delphi\Freezer\NewVersion\WebApp\View.Beskrivelse.List.pas
View.Beskrivelse.Edit.pas(1): Preprocessor: C:\Users\xx\ODrive\Delphi\Freezer\NewVersion\WebApp\View.Beskrivelse.Edit.pas
View.Settings.List.pas(1): Preprocessor: C:\Users\xx\ODrive\Delphi\Freezer\NewVersion\WebApp\View.Settings.List.pas
View.Settings.Edit.pas(1): Preprocessor: C:\Users\xx\ODrive\Delphi\Freezer\NewVersion\WebApp\View.Settings.Edit.pas
View.Miljo.List.pas(1): Preprocessor: C:\Users\xx\ODrive\Delphi\Freezer\NewVersion\WebApp\View.Miljo.List.pas
View.Miljo.Edit.pas(1): Preprocessor: C:\Users\xx\ODrive\Delphi\Freezer\NewVersion\WebApp\View.Miljo.Edit.pas
View.Crud.Container.pas(1): Preprocessor: C:\Users\xx\ODrive\Delphi\Freezer\NewVersion\WebApp\View.Crud.Container.pas
App.Config.pas(1): Preprocessor: C:\Users\xx\ODrive\Delphi\Freezer\NewVersion\WebApp\core\App.Config.pas
App.Types.pas(1): Preprocessor: C:\Users\xx\ODrive\Delphi\Freezer\NewVersion\WebApp\core\App.Types.pas
Auth.Service.pas(1): Preprocessor: C:\Users\xx\ODrive\Delphi\Freezer\NewVersion\WebApp\core\Auth.Service.pas
Dataset.Plugins.pas(1): Preprocessor: C:\Users\xx\ODrive\Delphi\Freezer\NewVersion\WebApp\core\Dataset.Plugins.pas
Grid.Plugins.pas(1): Preprocessor: C:\Users\xx\ODrive\Delphi\Freezer\NewVersion\WebApp\core\Grid.Plugins.pas
Grid.Settings.pas(1): Preprocessor: C:\Users\xx\ODrive\Delphi\Freezer\NewVersion\WebApp\core\Grid.Settings.pas
Paginator.Plugins.pas(1): Preprocessor: C:\Users\xx\ODrive\Delphi\Freezer\NewVersion\WebApp\core\Paginator.Plugins.pas
Crud.Utils.pas(1): Preprocessor: C:\Users\xx\ODrive\Delphi\Freezer\NewVersion\WebApp\core\Crud.Utils.pas
ConnectionModule.pas(1): Preprocessor: C:\Users\xx\ODrive\Delphi\Freezer\NewVersion\WebApp\ConnectionModule.pas
View.UserProfile.pas(1): Preprocessor: C:\Users\xx\ODrive\Delphi\Freezer\NewVersion\WebApp\View.UserProfile.pas
View.ErrorPage.pas(1): Preprocessor: C:\Users\xx\ODrive\Delphi\Freezer\NewVersion\WebApp\View.ErrorPage.pas
View.Login.pas(1): Preprocessor: C:\Users\xx\ODrive\Delphi\Freezer\NewVersion\WebApp\View.Login.pas
View.Main.pas(1): Preprocessor: C:\Users\xx\ODrive\Delphi\Freezer\NewVersion\WebApp\View.Main.pas
Duplicates not allowed
[Fatal Error] Duplicates not allowed

Any one know how to avoid this and to get the project compiled.

Hello @Busch_Henrik, welcome to TMS Support Center!

Are you able to share the project so we can reproduce it at our side?

Hi, Thank you.

This is screen copies of what i did and see in delphi after the wizzard are done and selecting View.main.pas





I have a SQL DB on a MS Developer SQLServer and that DB are made available with a project made with your XData Server.

This is the data that i choose to be the source in the wizard of the TMS XData Web application. I did use the default port 80 and no path so the URL are: localhost on the Xdata server.

This is the return on a web page

{
"value": [
{
"name": "Beskrivelse",
"url": "Beskrivelse"
},
{
"name": "UOM",
"url": "UOM"
},
{
"name": "Kunde",
"url": "Kunde"
},
{
"name": "Miljo",
"url": "Miljo"
},
{
"name": "Kategori",
"url": "Kategori"
},
{
"name": "Home",
"url": "Home"
},
{
"name": "Placering",
"url": "Placering"
},
{
"name": "Items",
"url": "Items"
},
{
"name": "Settings",
"url": "Settings"
}
]
}

Can you please send full source code of the generated application, located in folder C:Users henrikbusch\OneDrive\Delphi\Freezer\NewVersion\WebApp.

Hi,

Sorrry for the delay. I just tried again to create the project with the latest version of TMS Xdata 5.19.0.3 and i still get the same error.
I have also tried to create the project but moved the files from a onedrive directory (as stated in the bug report) to a directory on the C drive outside onedrive. But again with the same error. Attached are the source files.
DelphiTest.zip (426.4 KB)

My RadStudio are: Embarcadero® Delphi 12 Version 29.0.53571.9782
Delphi 12 with Update 2, RAD Studio 12.2. Patch 1
My OS are Windows 11 Version 24H2 build 26100.2605 64 Bit) on a Mac Book Pro M1 through Parallels.

The problem is in unit View.Main.pas, which has two duplicated labels named lblViewHome. That's because the original file already has such label, and it seems like you have some entity/table in your application that is named Home as well.

I have manually tweaked both ViewMain.pas and ViewMain.dfm to rename one of the labels so it doesn't get duplicated.

View.Main.zip (2.9 KB)

Thank you. Yes i have a table called Home in my DB.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.