Hi
how could you get multiple results when your code is settings all the
found values into ONE variable only?
You need an array to do something like that, or you can also set all
yours values one after another in a string or a buffer, but what you do
currently is simply replacing one value by th next in your variable0
Best regards
--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting
Ready for you: WXShowroom.com, WXReplication (open source) and now WXEDM
(open source)
More information on
http://www.fabriceharari.comLe 7/27/2017 à 4:53 AM, Mister RUAN a écrit :
Good Day
I created a web service on WebDev. First I declared a structure:
STGetCurrentPrice is Structure
bSuccess is boolean
sErrorMessage is string
sProductCode is string
sProductDescription is string
cyPrice is currency
nProductID is int
END
Then i created a Procedure:
PROCEDURE getCurrentPrice(sProductCode)
stThisresult is STGetCurrentPrice
FOR EACH Service_Product_Test WHERE Service_Product_Test.ProductCode =
sProductCode
stThisresult.bSuccess = True
stThisresult.sProductCode = Service_Product_Test.ProductCode
stThisresult.sProductDescription =
Service_Product_Test.ProductDescription
stThisresult.cyPrice = Service_Product_Test.Price
END
RESULT stThisresult
It Works great but It only returns a single result and not multiple
results.
I have 2 Items in my database with ItemCode "AAA" but it only returns 1
I have this test Procedure that returns result:
PROCEDURE TestGetCurrentPrice()
sDisplayResult is string = [
bSuccess = %1
sErrorMessage = %2
sProductCode = %3
sProductDescription = %4
cyPrice = %5
]
stTheresult is ServerProcedures.STGetCurrentPrice
stTheresult = ServerProcedures.getCurrentPrice("AAA")
InfoBuild("Good
Code"+CR+sDisplayResult,stTheresult.bSuccess,stTheresult.sErrorMessage,stTheresult.sProductCode,stTheresult.sProductDescription,stTheresult.cyPrice)
How can I get a result that return both lines at the same time?
Regards
Ruan