Strange error

Forum related to ADO

Moderators: gto, cipto_kh, EgonHugeist

Fresh Boarder
Fresh Boarder
Posts: 3
Joined: 05.02.2018, 00:27

Strange error

Postby iancoullie » 15.05.2018, 21:04

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;
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.Active := false;
qu.SQL.text := 'Select AverageCost, SellingPrice1, SellingPrice2, SellingPrice6, Description from ICBase where Code = ''' + partNo + '''';

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

Return to “ADO”

Who is online

Users browsing this forum: No registered users and 0 guests