Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 3 of 3 total |
Loading custom dataset |
Sun, Feb 9 2014 9:29 AM | Permanent Link |
Uli Becker | I use some custom datasets and have written a module for that.
In order to load rows I have to use a request and read the result from the responsecontent (at least I don't know another way to do that). Since I can set the "Custom DataSets Resource Name" and the "Custom DataSets Module" in EWB webserver, it would be great to have a procedure like this (I added it to WebData and if works fine): procedure TDatabase.LoadCustomDataset(DataSet: TDataSet; Append: Boolean=False); var TempRequest: TServerRequest; I: Integer; begin DataSet.AppendLoad:=Append; TempRequest:=FRequestQueue.GetNewRequest; TempRequest.URL:='customdatasets'; TempRequest.Params.Add('method=rows'); TempRequest.Params.Add('dataset='+DataSet.DataSetName); for I:=0 to DataSet.Params.Count-1 do TempRequest.Params.Add(DataSet.Params[I]); TempRequest.Data:=DataSet; TempRequest.OnComplete:=RequestComplete; if (FUserName <> '') and (FPassword <> '') then begin TempRequest.RequestHeaders.Values['X-EWBUser']:=FUserName; TempRequest.RequestHeaders.Values['X-EWBPassword']:=FPassword; end; FRequestQueue.AddRequest(TempRequest); end; Of course 'customdatasets' would have to be a variable. Uli |
Mon, Feb 10 2014 5:11 AM | Permanent Link |
Uli Becker | Never mind.
Database.BaseURL:='customdatasets'; will do it. Uli |
Mon, Feb 10 2014 8:39 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Uli,
<< Never mind. Database.BaseURL:='customdatasets'; will do it. >> Just a quick note about this feature: with the advent of the new dataset URL structure in 1.03, I'll most likely be removing the "custom dataset module" setting in the EWB web server at some point in favor of just using the normal modules. I'll probably keep around the custom dataset resource name setting in order to allow mapping one to the other, but there's really no need for the custom dataset module setting anymore, and it isn't flexible enough to allow for having multiple custom dataset modules. In addition, dataset responses often need to be mixed with non-dataset responses (think login authentication). I'm (hopefully) going to have time to do a video on this topic this week, since it's an important piece of the puzzle and is needed quite often. Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Wednesday, April 24, 2024 at 11:07 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |