Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 9 of 9 total |
Datasets empty after upgrade |
Fri, Jun 7 2013 4:16 PM | Permanent Link |
Sergei Safar | Hi,
after upgrading from 1.01B5 to 1.02B1 my Datasets can not be populated anymore. I did a downgrade to 1.01B5 and the datasets are correctly populated after a Database.Load(myDataset) command; Am I missing something here? Thank you. best regards, Sergei Safar |
Sat, Jun 8 2013 2:54 AM | Permanent Link |
Matthew Jones | <Sergei Safar> wrote:
> Hi, > > after upgrading from 1.01B5 to 1.02B1 my Datasets can not be populated > anymore. I did a downgrade to 1.01B5 and the datasets are correctly > populated after a Database.Load(myDataset) command; > > Am I missing something here? > > Thank you. > > best regards, > Sergei Safar I imagine that more detail may help get a resolution. -- Matthew Jones |
Sun, Jun 9 2013 9:22 AM | Permanent Link |
Sergei Safar | Hi Matthew,
here is just a piece of code: Button1: TButton; DSCity : TDataset; Grid1 : TGrid; procedure TForm1.Button1Click(Sender: TObject); begin DSCity.Open; DSCity.Params.Clear; DSCity.Params.Add('State=all'); Database.BaseUrl := '/view/loadcity.php'; Database.Load(DSCity); end; procedure TForm1.DSCityAfterLoad(Sender: TObject); begin if DSCity.RowCount = 0 then begin ShowMessage('No cities avaiable'); end; end; The loadcity.php returns data in Jason format. This works fine when my app is compiled in EWB 1.01B5, but when compiled in EWB 1.02B1 the dataset DSCity is always empty, i.e., the Grid1 is empty, no data. Recompiled my app again with 1.01B5 and the Grid1 shows all data. Hope that helps. Best regards, Sergei Safar |
Mon, Jun 10 2013 4:55 AM | Permanent Link |
Matthew Jones | I imagine that the JSON changed slightly in the update. I note that the update info
says you can retrieve and load the JSON, so perhaps a quick hack to load some test data and retrieve the JSON to see how it looks, and compare against the format your PHP is generating might reveal the answer? /Matthew Jones/ |
Mon, Jun 10 2013 6:05 AM | Permanent Link |
Uli Becker | Sergei,
> DSCity.Open; > DSCity.Params.Clear; > DSCity.Params.Add('State=all'); Is "all" a string? Then the missing quotes could be the problem: DSCity.Params.Add('State=''all'''); Uli |
Mon, Jun 10 2013 9:54 AM | Permanent Link |
Sergei Safar | Ulrich,
thanks for the reply. The statement DSCity.Params.Add('State=all'); works fine and PHP "understands" the parameter State via statement: <?php ... $selstate = $_REQUEST["State"]; ... ?> I seems that the problem is regarding jason format in this new version of EWB. Best regards, Sergei Safar |
Mon, Jun 10 2013 10:34 AM | Permanent Link |
Sergei Safar | Matthew,
I found the problem. The problem is a field that is TINYINT in MySql and dtBoolean in Dataset. For some reason, the Dataset is not loaded in this case. I changed dtBoolean to dtInteger and the Dataset is loading correctly. MySQL do not have boolean fields and I am using TINYINT fields. The strange is that in the prior version of EWB (1.01B5) the dataset is loaded anyway. Best regards, Sergei Safar |
Mon, Jun 10 2013 1:47 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Sergei,
<< I found the problem. The problem is a field that is TINYINT in MySql and dtBoolean in Dataset. For some reason, the Dataset is not loaded in this case. I changed dtBoolean to dtInteger and the Dataset is loading correctly. MySQL do not have boolean fields and I am using TINYINT fields. The strange is that in the prior version of EWB (1.01B5) the dataset is loaded anyway. >> Were you seeing an error at runtime with the EWB application (browser-side) ? You should see an error about the value not being a correct boolean value. The StrToBool function changed so that it raise an exception when the values aren't either "True" or "False". Before, the result would just be set to False, even if the input value was '1'. Thanks, Tim Young Elevate Software www.elevatesoft.com |
Fri, Jun 14 2013 8:28 AM | Permanent Link |
Sergei Safar | Tim,
"You should see an error about the value not being a correct boolean value." No exception is raised in this situation. When this occurs, i.e., a field of type INTEGER at database side and BOOLEAN at TDataSet side and the following statement is executed (Database.Load(Dataset) the Dataset remains empty. If you change the field type from BOOLEAN to INTEGER at Dataset side, everything works fine. Best regards, Sergei Safar |
This web page was last updated on Saturday, April 27, 2024 at 08:52 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |