Ask Your Question
2

How can I add a log message with "print" inside a stored procedure that is invoked with JDBI @SqlCall?

asked 2023-07-10 07:23:53 +0000

lakamha gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2023-07-10 07:40:02 +0000

scrum gravatar image

You can add a log message with "print" inside a stored procedure that is invoked with JDBI @SqlCall by using the SQL "PRINT" statement in your stored procedure.

For example, if you want to print a message "Hello world!" inside your stored procedure, you can add the following statement in your stored procedure:

PRINT 'Hello world!'

Then, when you invoke your stored procedure with JDBI @SqlCall, the message will be printed in the console or log file, depending on your logging configuration.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-07-10 07:23:53 +0000

Seen: 8 times

Last updated: Jul 10 '23