Showing posts with label bol. Show all posts
Showing posts with label bol. Show all posts

Wednesday, March 21, 2012

PostExecute() and Cleanup()

So when do I use which and why? BOL pretty much makes them the same but I figure there must be a difference rather like PreExecute is the first opportunity to get our hands on the BufferManager so maybe PostExecute is our last chance?

Thanks

AllanHi Allan,

In general PostExecute and Cleanup are the same and as a rule of thumb anything you did in PreExecute you cleanup in PostExecute and anything you did in PrepareForExecute you clean up in Cleanup. However, that is not required. You might ask why there are two if they are the same. The answer is that there were thoughts about using one as a one shot and the other as called every time (think looping). However, currently this is not the case and they are interchangeable just as PrepareForExecute and PreExecute.

HTH,|||Hi Matt

Yes that was a Q i was asking myself but thanks for clearing this up.

Allan

Monday, March 12, 2012

possible to suppress DOS windowns in OSQL?

I just scanned the OSQL articles in BOL and I am not sure if there is a way to do this but I want to suppress the empty black DOS windows when calling my batch files that contain osql commands. Any ideas?I'd use the START command with the /MIN option.

-PatP|||... and additionally you can use /B option to control all in one window