You are not logged in.
Pages: 1
Help
When I run the code in mormot2\ex\mvc-blog on my computer, and changed the backend database to mssqlserver and inserted data, it reported that: TOdbcLib error: [42000] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server] Implicit conversion from data type varchar(max) to varbinary(max) is not allowed.
(8180)\r\n",Statement:{Sql:"insert into dbo.Article (ID,CreatedAt,ModifiedAt,Title,Content,ContentHtml,Author,AuthorName,PublishedMonth,abstract,Tags) values (?,?,?,?,?,?,?,?,?,?,?)",SqlWithInlinedParams:"insert into dbo.Article (ID,CreatedAt,ModifiedAt,Title,Content,ContentHtml,Author,AuthorName,PublishedMonth,abstract,Tags) values (5,135969775136,135969775136,'Plu bli cho chu blo. ','Pha cho, cha ble chi bli? Plu cha bli cho cho chi bla bla chi chi blo cha che blo ble blo cha chi blu blo chi cho bli.\r\nPhi bla cho bli cho cho. Plo bli chi cha, cho bla blo bla chi blo chi bla chi bli, che cha blo, chi ble cho.\r\nPli chi blo bli, blo cho che bli bli, chu cho cho bli chi.\r\nPlu bla che bla blu. Pho bla bla bla, blu bli https://synopse.info bla chu che cho chi chi chi chi bli ble bla blo bli che chu chi blo cha cho https://synopse.info chi che chu cha blo. Phi bla chi bla blo cho blo blo chu cha cha, bla bli chi chu blo, bli cho https://synopse.info cho blu cho bli bli chi blu che cha? Pha cha, cha blu bli blo chu blo.\r\nPho cha bla blo bla bla bli chi cho bli blu, bli cha bli cho blo blo che bli cho blo cho https://synopse.info cha bli. Plu bli blu bla chu. Pha blo chi blu che, chu che cho che bla. Plu che, cho cho chi che chu chu bla. Plo bli cho blu bla chi che.\r\nPhi chi chu blu cha cho bla.',0,1,'synopse',24168,'Pla cho cho, cha chi bla bli chu cha bla cha chi, bli bla cho, cho chu blu bli che, ble cha bli.\r\nPlu blu? Phi chi bla bli chi bla!',null)"
the field Tags is TIntegerDynArray. When insert into “null” can not convert to blob.
When I changed the backend database to mssqlserver and inserted data, it reported that implicit conversion from data type 'sql_variant' to 'bigint' was not allowed.
The mssqlserver tracking prompt is as follows: "declare @ p1 int
set @p1=NULL
exec sp_prepare @p1 output,N'@AA SQL_VARIANT,@BA SQL_VARIANT,@CA SQL_VARIANT,@DA SQL_VARIANT,@EA SQL_VARIANT,@FA SQL_VARIANT,@GA SQL_VARIANT,@HA SQL_VARIANT',N'insert into dbo.Article (ID,Title,Author,Content,CreatedAt,UpdatedAt,ViewCount,Published) values (@AA,@BA,@CA,@DA,@EA,@FA,@GA,@HA)',1
select @p1“
Help, where should I fix this error
Win32 or Win64?
I just found the reason. I used madexcept to detect memory leaks during debugging, and after removing it, everything went smoothly.
Thank you very much.
Win32 or Win64?
i am not set the output headers by hand in server and not use cookies . debug in win32.
I downloaded the source code from GitHub and run the example.
When debugging with Delphi 12.1, input http://localhost:8092 in Edge .
The breakpoint is at line 10879 of the mormot.cre.text.as unit.
After pressing F8, pause at line 8022 of the mormot.rest.server. pas unit
and continue stepping to locate line 8652 of the mormot.net.server. pas unit.
As I mentioned above, everything works fine when I debug with Lazaus。
Which compiler?
Which Operating System?Can you give more context?
Delphi12.1
win10。
Additionally, I compiled it once using Lazarus, and everything went smoothly.
When I debug, the returned value is on line 8016 of the mormot.rest.server.pas unit
// lazarus: Call.OutHead = 'Content-Type: text/html;charset=utf-8'
//delphi12.1:OutHead 'Content-Type: text/html;charset=utf-8'#$D#$A'ETag: "E039C149"'
When I run the code in mormot2\ex\mvc-blog on my computer, an error occurs: 00000000156a25fa # EXCOS EAccessViolation (c0000005 EXCEPTION_ACCESS_VIOLATION) [blog 2] at 5abb8e mormot.core.text.pas IsInvalidHttpHeader (10879) {16 0.89 0.57 10GB/31.8GB 4a651701}. However, it runs normally on another computer. How can I resolve this error on my computer, or is there a part of my computer that might be malfunctioning?
Pages: 1