Temporary table with FetchAll=False

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
spzsoft
Posts: 4
Joined: Tue 30 Oct 2007 17:51

Temporary table with FetchAll=False

Post by spzsoft » Thu 04 Nov 2010 19:31

Hi
I ave this code
-------------------------------------
CREATE TABLE [#T184026YZ]
(
[KeyRigo] FLOAT NOT NULL,
........ other fields .........
[Quantita] FLOAT NULL,
[PrzTot] FLOAT NULL,
)
SELECT SUM(Quantita) as TotQuantita ,SUM(PrzTot) as TotValore
FROM "#T184026YZ"
-----------------------------------
if the FetchAll property of TMSQery is True the code is Ok
if FetchAll=False I ave the error "Invalid object name 'T184026YZ'

In this case I open all table and query of the application with FetchAll=false.

Best Regards
Basilio

AndreyZ

Post by AndreyZ » Mon 08 Nov 2010 15:22

Hello,

To solve the problem set the TMSConnection.Options.MultipleActiveResultSets property to True. It allows applications to have more than one pending request per connection, and, in particular, to have more than one active default result set per connection.

Post Reply