VistaDB 5
PRINT allows for writing of informational messages back to the host application through the VistaDBConnection. Applications may subscribe to the PRINT message notifications through the VistaDBConnection class.

Data Builder Support

The Data Builder includes all PRINT messages as a part of the Log panel.


Example of a print statement writing to the LOG.

Performance Considerations

Note that any calls to your application print event handler are run as the line is being executed in the SQL script. Any long running commands as a part of the callback will slow down overall execution of the SQL.

Logging PRINT statements

As an example of when you might want to build a debugging tool to log all of the PRINT statements as they are being run. You could do this simply by subscribing to the event. See this example for more information.


This command may not be executed through DDA. This is a SQL only concept.


-- Print out when this message was generated PRINT 'This message was printed on ' + RTRIM(CONVERT(varchar(30), GETDATE())) + '.'
IF EXISTS (SELECT zip FROM authors WHERE zip = '94705') PRINT 'Berkeley author'

See Also