You are not logged in.
Pages: 1
Hi ab,
I'm trying to use mORMot with SQL Server 2008, get an error message after query the database multiple times.
code:
...
fProps := TODBCConnectionProperties.Create('','DSN=LocalhostDB;UID=sa;PWD=123;APP=Enterprise;WSID=ARVIN-F;DATABASE=HIS;','',''); // The database link is correct
Conn := fProps.ThreadSafeConnection;
if not Conn.Connected then
Conn.Connect;
fServer := THttpApiServer.Create(false);
fServer.AddUrl('root', '888', false, '+', true);
fServer.RegisterCompress(CompressDeflate);
fServer.OnRequest := Process;
fServer.Clone(31);
...
function TJSONServer.Process(Ctxt: THttpServerRequest): cardinal;
begin
try
if length(Ctxt.InContent)<5 then
raise ESynException.CreateUTF8('Invalid request % %',[Ctxt.Method,Ctxt.URL]);
Ctxt.OutContentType := JSON_CONTENT_TYPE;
Ctxt.OutContent := fProps.Execute(Ctxt.InContent,[]).FetchAllAsJSON(true);
result := 200;
except
on E: Exception do begin
Ctxt.OutContentType := TEXT_CONTENT_TYPE;
Ctxt.OutContent := StringToUTF8(E.ClassName+': '+E.Message)+#13#10+Ctxt.InContent;
result := 504;
end;
end;
end;
The Errormessage is this:
EAccessViolation: Access violation at address 0045E5A1 in module 'JsonSQLServer.exe'. Read of address 02310000
mORMot code:
function UpperCopy255BufSSE42(dest: PAnsiChar; source: PUTF8Char; sourceLen: PtrInt): PAnsiChar;
asm // eax=dest edx=source ecx=sourceLen
test ecx,ecx
jz @z
movdqu xmm1, dqword ptr [@az]
movdqu xmm3, dqword ptr [@bits]
cmp ecx, 16
ja @big
// optimize the common case of sourceLen<=16
movdqu xmm2, [edx] [b]<<<<< an exception occurs[/b]
....
Offline
Pages: 1