Tips and Frequently Asked Questions
Setting SQL Server ApplicationName from client
When using SQL Server at RemoteDB server side, you might want to make client to set ApplicationName parameter of server connection. You can achieve that by sending the parameter through a HTTP header “db-app-name", and using a middleware at server side to grab that value and set in connection. This approach can be used to set other server-side database connections from client side.
On server side:
threadvar ThreadApplicationName: string; procedure StartServer; var Server: THttpSysServer; Module: TRemoteDBModule; begin Server := THttpSysServer.Create; try Module := TRemoteDBModule.Create(''http://localhost:2001/tms/remotedb'', TDBConnectionFactory.Create( function: IDBConnection var Module: TConnectionModule; begin Module := TConnectionModule.Create(nil); // Use ThreadApplicationName to configure your connection if ThreadApplicationName <> '''' then Module.FDConnection.Params.Values[‘ApplicationName’] := ThreadApplicationName; Result := TFireDacConnectionAdapter.Create(Module.FDConnection1, Module); end ) ); Module.AddMiddleware(TAnonymousMiddleware.Create( procedure(C: THttpServerContext; Next: THttpServerProc) begin ThreadApplicationName := C.Request.Headers.Get(''db-app-name''); Next(C); ThreadApplicationName := ''''; end )); Server.AddModule(Module); Server.Start; WriteLn(''RemoteDB server running...''); ReadLn; finally Server.Free; end; end;
RemoteDBDatabase1.OnRequestSending := RequestSending; procedure TfmThreeTierAureliusRemoteDB.RequestSending(Sender: TObject; Req: THttpRequest); begin Req.Headers.SetValue(''db-app-name'', ''My Application''); end;
Pricing
Single Developer License
Small Team License
Site License
TMS BIZ Essential
€ 395
€
120
yearly renewal
license for 1 developer
TMS BIZ Standard
€ 495
€
150
yearly renewal
license for 1 developer
MOST POPULAR
TMS BIZ Premium
€ 595
€
180
yearly renewal
license for 1 developer
BEST VALUE
All prices excl. VAT. Renewal price is subject to change and only valid up to 30 days after license has expired. After renewal period a discount price is offered to renew the license.