Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
dev2dev
Starting Member
48 Posts |
Posted - 2008-04-14 : 07:09:42
|
| I have an app developed in VB6. This calls some of sps in sql server.Most of the times it behaves properly by NOT showing PRINT statements written in the stored procedure but some times it shows.[Microsoft][ODBC Server Driver][Sql Server] 'blah blah' 'blah blah' is the message/text I print my stored procedure.I don't know exact behavior that when PRINT in makes client apps calling will show it and when it won't show. May be I forgotNote: These are the sps called both from GUI application and from query window. so I can't avoid using PRINT in these sps. I am using ADODBThanks |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-04-14 : 07:13:11
|
| What you can do is add a bit parameter called Debug and include the print statements within a IF statement with condition check @Debug=1. Make the default value of the parameter as 0 and dont pass any value from your app so that it takes the default value 0 and wont pick these PRINT statements while calling sp. Whereas you can always pass the parameters value as 1 when you run it in query analyser to view the intermediate PRINT statement results. |
 |
|
|
|
|
|