![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 5 of 5 total |
![]() |
Wed, Aug 12 2015 4:57 PM | Permanent Link |
Michael Saunders | I have found many answers to my needs form these great forums however I cannot find the answer to this what I think shold be very simple
The following works when StockItem is a string but I cannnot see how to do this if StockItem is an integer tbStockLookup.Params.Clear; tbStockLookup.Params.Add('StockItem='''+edStockLookup2.text+''''); Database.LoadRows(tbStockLookup); Thanks Mike |
Wed, Aug 12 2015 5:04 PM | Permanent Link |
Uli Becker | Michael,
> I have found many answers to my needs form these great forums however I cannot find the answer to this what I think shold be very simple > tbStockLookup.Params.Clear; > tbStockLookup.Params.Add('StockItem='''+edStockLookup2.text+''''); > Database.LoadRows(tbStockLookup); tbStockLookup.Params.Clear; tbStockLookup.Params.Add('StockItem=' + IntToStr(Value)); Database.LoadRows(tbStockLookup); Uli |
Wed, Aug 12 2015 5:27 PM | Permanent Link |
Uli Becker | Or (if you want to use the value of an edit field)
tbStockLookup.Params.Clear; tbStockLookup.Params.Add('StockItem=' + edStockLookup2.text); Database.LoadRows(tbStockLookup); Uli |
Wed, Aug 12 2015 5:38 PM | Permanent Link |
Michael Saunders | Uli Becker wrote:
Michael, > I have found many answers to my needs form these great forums however I cannot find the answer to this what I think shold be very simple > tbStockLookup.Params.Clear; > tbStockLookup.Params.Add('StockItem='''+edStockLookup2.text+''''); > Database.LoadRows(tbStockLookup); tbStockLookup.Params.Clear; tbStockLookup.Params.Add('StockItem=' + IntToStr(Value)); Database.LoadRows(tbStockLookup); Uli You put me on the right track but I have got it working as follows tbTabletInvoice.Params.Add('TabletID='+edReopen.Text); what confuses me is all those quotes in the following tbStockLookup.Params.Add('StockItem='''+edStockLookup2.text+'''' ); I dont suppose you can explain what they all mean Thanks |
Wed, Aug 12 2015 6:06 PM | Permanent Link |
Uli Becker | Michael,
it's quite simple if you imagine the resulting param string. For string values: MyParam='MyValue' For integer values: MyParam=1 When you compose the paramstring, you have just to use the matching number of quotes: For string values: Params.add('MyParam=''' + StringValue + '''') For integer values: Params.add('MyParam=' + IntegerValueAsString); String params always with quotes, integer params without quotes, but casted as strings. Hope that helps. P.S. The number of quotes is not tested, just written on my tablet. ![]() Uli |
This web page was last updated on Wednesday, March 29, 2023 at 10:59 PM | Privacy Policy![]() © 2023 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |