Page 1 of 1

Strange error

Posted: 15.05.2018, 21:04
by iancoullie
Hi All

I have a situation i don't understand. I hope someone can throw some light on.
The code below query's an OLEDB provider for a small, little known business database. After initiating the query from inside a mormot SOA server, there is about a 10 second delay. The server log throws an error, "current provider does not support commands with parameters". It then produces the correct result. I have tried the same code with a vcl component outside of mormot server. The delay is about the same but the the result comes with no error shown.

ta: TZConnection;
qu: TZReadOnlyQuery;
begin
try
ta := TZConnection.Create(nil);
ta.ReadOnly := true;
ta.Version := '7.2.1-rc';
ta.UseMetadata := false;
ta.Protocol := 'ado';
ta.Database := 'Provider=PBSOLEDB.PBSOLEDB;User ID=pricefind;Data Source=G:\Prophet;Location=G:\Prophet\datahl';
ta.Connected := true;

qu := TZReadOnlyQuery.Create(nil);
qu.AutoCalcFields := true;
qu.Connection := ta;
qu.SQL.Clear;
qu.Active := false;
qu.SQL.text := 'Select AverageCost, SellingPrice1, SellingPrice2, SellingPrice6, Description from ICBase where Code = ''' + partNo + '''';
qu.Open;

result := qu.FieldByName('AverageCost').AsFloat;

Re: Strange error

Posted: 26.05.2018, 17:39
by EgonHugeist
Hi,

how do you connect to with the mORMot SOA?

Re: Strange error

Posted: 28.05.2018, 03:37
by iancoullie
Hi Egon
Through a Delphi client talking to mormot HTTP Rest Server, ServiceFactoryServer and common Interface.
Iv also run direct from a delphi client with SQLMonitor. I dont see any error but the delay is the same.

Results below: The result is returned after 30 seconds with below fro SQLMonitor. When using this provider in XLS the result is instant. Its almost like a timeout somewhere.

28/05/2018 2:32:54 PM: CONNECT TO "Provider=PBSOLEDB.PBSOLEDB;User ID=pricefind;Data Source=G:\Prophet;Location=G:\Prophet\datahl" AS USER ""
28/05/2018 2:32:54 PM: SET CATALOG
28/05/2018 2:32:54 PM: Statement 1
28/05/2018 2:33:24 PM:
28/05/2018 2:33:24 PM: CLOSE CONNECTION TO "Provider=PBSOLEDB.PBSOLEDB;User ID=pricefind;Data Source=G:\Prophet;Location=G:\Prophet\datahl"

Re: Strange error

Posted: 28.05.2018, 13:01
by miab3
@iancoullie,

ADO in ZEOS is slow and restricted.
Maybe you could try OleDB or ODBC with Zeos 7.3

Michal