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;
Strange error
Moderators: gto, cipto_kh, EgonHugeist
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
Re: Strange error
Hi,
how do you connect to with the mORMot SOA?
how do you connect to with the mORMot SOA?
Best regards, Michael
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
-
- Fresh Boarder
- Posts: 9
- Joined: 05.02.2018, 00:27
Re: Strange error
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"
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
@iancoullie,
ADO in ZEOS is slow and restricted.
Maybe you could try OleDB or ODBC with Zeos 7.3
Michal
ADO in ZEOS is slow and restricted.
Maybe you could try OleDB or ODBC with Zeos 7.3
Michal