You are not logged in.
Pages: 1
In a server (a VCL FOrms application), i use a THttpApiServer and in the Process function i load a DLL, call a function that must load data from a SQL Server 2008 database.
In a test program if i load my dll and call the function, all works, i see the data.
In the server, if i place a button, and in the onclick i load the dll, and clal the function, i see the data.
In the process function i always have an error, like the process function could not "see" SQL Server.
Maybe the Process funcion is executed in a separate thread wit low rights?
Offline
THttpApiServer has its own thread pool.
So each thread should initiate its own connection to SQL Server.
Honestly, the easiest is not to start from THttpApiServer, but from a method-based or interface-based service at TSQLRestServer level.
It already supports proper threading, compatible with SynDB.
See http://synopse.info/files/html/Synopse% … #TITLE_265
Do not reinvent the wheel!
Offline
Pages: 1