You are not logged in.
Pages: 1
Thank both for your help.
Yes, that's a good workaround if you are able to change the table structure.
Also found that setting the EngineAddForcedID property on the TRestStorageExternal instance, does the trick. That way, resulting insert statement doesn't include the ID field.
see example : https://gist.github.com/MRIAG2026/fe2aa … 14fa0dfa68
Thanks ab
Sorry for this, here is the link:
https://gist.github.com/MRIAG2026/dd69f … e0b2165465
in this case, I guess that if the MSSQL table with IDENTITY field is not supported by the ORM, I will always have to call Execute/ExecuteInlined directly from TSQLDBConnectionProperties for inserting records.
Is this feature planned to be added in the future?
Hi All,
Please help.
I'm having trouble to get mORmot(2.4) ORM insert working with an existing MSSQL table with an IDENTITY field.
when I run
NewID := Server.Add(Rec, true);It runs
"select max(ID) from dbo.RemoteProcessTest"...and insists on sending the ID column in the insert statement - "insert into dbo.RemoteProcessTest (ID,ProcessId,Title) values (?,?,?))"
- then get an error :
Cannot insert explicit value for identity column in table 'RemoteProcessTest' when IDENTITY_INSERT is set to OFFI'm not sure if this is a bug or if I'm missing something in my configuration.
Table:
CREATE TABLE dbo.RemoteProcessTest
(
ID int IDENTITY(10000,1) NOT NULL,
ProcessId varchar(40) NOT NULL,
Title varchar(40) NOT NULL,
CONSTRAINT PK_RemoteProcessTest
PRIMARY KEY(ID)
); That's great!
Thanks
Thanks,
27158 in System.pas
while P[Result] <> #0 do
log file:
20220308 15395239 " EXCOS EAccessViolation (c0000005) [] at 41265f System.pas @PWCharLen (27158)
Hi All,
This is my first post. Thanks for the great Job! ![]()
I've found an issue when using TSynDaemon in the latest mORMot2 release.
... looking at, Project Project05HttpDaemon in ...\ex\ThirdPartyDemos\martin-doyle\05-HttpDaemonORM\src as an example ...
I believe there is a bug in mORMot2 when building for 64bit and starting the project as a service.
.\Project05HttpDaemon.exe /install - OK
When starting the service, using windows services dialog, I'm getting an error:
-----------------------------
Windows could not start the Project05HttpDaemon service on
Local Computer.
Error 1067: The process terminated unexpectedly.
-----------------------------
Log File :
...
20220308 10482210 ! info SetThreadName 243c=Main
20220308 10482210 ! info Daemon started, listening on port 11111
20220308 10482210 " EXCOS EAccessViolation (c0000005) [] at 41265f
Using :
Delphi 10.4 Update 2
Win 10 pro
(It is working fine when using 16 Dec 2021 release and/or 32bit in current release)
Any thoughts?
Pages: 1