You are not logged in.
I'm attempting to migrate an old legacy project from ADO/Soap to something a little faster. TSQLDBServerHttpApi seems to be working fine for normal selects, inserts and stored procedures. My problem is with stored procedures that return very large result sets that are need for certain reports (up to 50k rows and 100+ columns - Unfortunately I'm unable to change the logic for these stored procedures). I'm getting WinHTTP.dll timeouts on the client after about 20 seconds. I have tried increasing the client KeepAliveMS with no success. Any help would be appreciated.
Server:
Props := TOleDBMSSQL2012ConnectionProperties.Create('127.0.0.1','ReportsDB','user','password');
HttpServer := TSQLDBServerHttpApi.Create(Props,'ReportsDB','8787','user','password');
HttpServer.Properties.ConnectionTimeOutMinutes := 2;
Client:
http := TSQLDBWinHTTPConnectionProperties.Create('1.2.3.4:8787','ReportsDB','user','pass');
try
ds := TDataSet.Create(Self);
sql:= 'exec GetReportsSP param1, param2, param3';
ds := ToDataSet(ds,http.Execute(sql,[]));
PopulateGrid(ds);
finally
ds.Free;
end;
Offline
Does anyone have any suggestions? Should I attempt to use a specific type of compression? Any examples/suggestions would be very much appreciated.
Offline
Does 50k rows and 100+ columns take more than 20 seconds to be retrieved on server side?
Negative. It executes in SSMS after about 2 seconds. I also ran a trace on the server and it was also done in about 2 seconds.
Last edited by steve888 (2018-07-19 23:05:54)
Offline
Maybe you can use fiddler (webdev proxy software ) record your client http packet, then replay the packet from fiddler, see if it also takes 20 sec , may help you get clue (whether network problem or winhttplib or RESTClient code flaw)
Offline
Thanks for the reply. I got it working by calling RegisterCompress and by increasing the send/recieve timeouts. Now I'm having another problem with a stored proc that returns 300+ columns. FetchAllToBinary throws a 'Too Many Columns' exception. Any suggestions?
Offline