Page 1 of 1

TMSSQL and messages

Posted: Mon 27 Jun 2005 08:30
by Ray Mond
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

Posted: Mon 27 Jun 2005 12:10
by Ikar
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

Posted: Mon 27 Jun 2005 15:34
by Ray Mond
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

Posted: Wed 29 Jun 2005 08:54
by Ikar
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.