billyChou Posted August 21, 2017 Posted August 21, 2017 modify Demos\Desktop\FishFacts samples //----------------------- unit ServerModule; interface uses Variants, Classes, SysUtils, uniGUIServer, uniGUIMainModule, uniGUIApplication, uIdCustomHTTPServer; type TUniServerModule = class(TUniGUIServerModule) procedure UniGUIServerModuleCreate(Sender: TObject); procedure UniGUIServerModuleHTTPCommand(ARequestInfo: TIdHTTPRequestInfo; AResponseInfo: TIdHTTPResponseInfo; var Handled: Boolean); private { Private declarations } protected procedure FirstInit; override; public { Public declarations } CurrentTheme : string; end;function UniServerModule: TUniServerModule;implementation{$R *.dfm}uses UniGUIVars, MainModule; procedure TUniServerModule.UniGUIServerModuleHTTPCommand( ARequestInfo: TIdHTTPRequestInfo; AResponseInfo: TIdHTTPResponseInfo; var Handled: Boolean);begin if ARequestInfo.URI = '/test2' then begin // ARequestInfo.QueryParams; //** I can't get params.values['search_me'] rs := '' ; try // UniMainModule.ClientDataSet.Active := true; UniMainModule.ClientDataSet.Insert; // error UniMainModule.ClientDataSet.FieldByName('Category').Value := 'test'; UniMainModule.ClientDataSet.Post; except end; Handled := true; end;end; //----------------------------------- Thanks Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.