TMSSQL and messages

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Ray Mond

TMSSQL and messages

Post by Ray Mond » Mon 27 Jun 2005 08:30

Is it possible to get the informational messages using the TMSSQL component? I can't seem to get the messages from that component, and the OnInfoMessage event in TMSConnection does not fire either.

Using TMSQuery, I can get the info messages.

E.g. of stmt I'm using:

BACKUP DATABASE pubs TO DISK = 'c:\pubs.bak'

Thanks.


Ray Mond

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Mon 27 Jun 2005 12:10

OLE DB doesn't provide this ability.

Following the list of Transact-SQL commands that generate info messages:

PRINT
RAISERROR with a severity of 10 or lower
DBCC
SET SHOWPLAN
SET STATISTICS

Ray Mond

Post by Ray Mond » Mon 27 Jun 2005 15:34

So I have to use TMSQuery? What does that use to get the informational messages? Something other than OLE DB? Just curious. Thanks.

Ray Mond

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Wed 29 Jun 2005 08:54

Yes, you should use just TMSQuery. In principle, this functionality can be added and to TMSSQL but it will complicate a schema of execution and cause some delay in execution of queries not returning resultset.

Post Reply