hendrang Posted November 30, 2012 Share Posted November 30, 2012 Hi all, My unigui apps call a simple function in a Datasnap application simultaneously. I am using Delphi XE. the function in Datasnap is: function TServerMethods2.RetValue(aVal:Integer): Integer; begin Sleep(1000); // pause execution for simulating simultaneous execution Exit(aVal); end; the function just return back the parameter value, no other calculation. and the code to call the RetValue function in uniGui application : procedure TMainForm.UniBitBtn1Click(Sender: TObject); var i,x: Integer; begin UniListBox1.Clear; for I := 1 to 10 do begin x:= ClientModule1.ServerMethods2Client.RetValue(i); UniListBox1.Items.Add(IntToStr(x)); // Return value in listbox end; end; and the correct result is : but if I call the DataSnap function simultaneously by opening the uniGui in two firefox tabs, it retuns variety wrong value. How can I solve the problem and thanks in advance. Thanks Hendra Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.