Re: Writing files with stored procedures
Posted in 2000
Topics: Stored Procedures & SPL, Triggers, Constraints & Referential Integrity
> I've verified this by the way... > The only drawback is that every line gets prepended by "trace > expression :" but you SP code will look much cleaner. ;-} > > Cheers, > Lyzander Marantal That'll be one point for you: the source will be cleaner. As allways in life there is a little "but..." But... think of using a stored procedure in a triggered action. Imagine a situation where a multiple update will activate a trigger and you want to trace EACH call of your procedure. That way you would have to create a new file for every thread you create using a dynamic "DEBUG FILE TO xxx". So that would surely look nicer in a "One-File-Solution". I think both solutions are quiet ok. Greetings, Chris
Sorry Chris, but I'd have to disagree with you. See below. In article <39474E9E.B0C7F881@funkytown.de>, Chris Brauer > >That'll be one point for you: the source will be cleaner. >As allways in life there is a little "but..." > >But... think of using a stored procedure in a triggered action. Imagine >a situation where a multiple update will activate a trigger and you want to >trace EACH call of your procedure. As I've mentioned before, tracing isn't turned on! You have to specifically put "TRACE ON" if you want the procedure to be traced. If you don't, then the procedure won't be traced but you can still be able to write to the debug file using the "TRACE" command. >That way you would have to create a new file for every thread >you create using a dynamic "DEBUG FILE TO xxx". >So that would surely look nicer in a "One-File-Solution". Why would you have to create a new file? Didn't you see the "WITH APPEND" clause in my previous post? The procedure can use just one file and just append to it everytime it needs to write something. >I think both solutions are quiet ok. > I think so too, but I just want to clarify some points. >Greetings, > >Chris Cheers, Lyzander * Sent from RemarQ http://www.remarq.com The Internet's Discussion Network * The fastest and easiest way to search and participate in Usenet - Free!
> Why would you have to create a new file? Didn't you see the "WITH > APPEND" clause in my previous post? The procedure can use just > one file and just append to it everytime it needs to write > something. > Damn, missed the WITH APPEND. Of course you are right, sorry. To be honest I didn't realize the WITH APPEND option 'til you mentioned it. Nice option, maybe I'll use it in the future instead of "my" old way. Anyway, have a good day Chris