Funny. I was thinking you'd have to send SQL server a command or if truly automating the app, then they'll at least be able to get you (and all of us in the forum) pointed in the right direction (object etc.)
Also, it would be wise to say you want to "do it from VBA which is more or less VB 6". I would also advise against mentioning Access as about half the time someone will tell you to post elsewhere even if you ARE asking a SQL Server question.
It's to help with documenting our work. I'm a data manager with a team of analysts working on an incidents based system running various ad-hoc data manipulation/retrieval/analysis tasks.
Standard practice for incident resolution is to save the sql run to a text file in a new folder, tagged with the incident number and analyst name.
Currently this means a manual copy, paste to text file, save file, create folder in right location with correct name and filename.
I'd like to have an app running that automates this process, i.e. switch to app, click button, job done.
It might seem a bit trivial, but with five analysts resolving an average 15 incidents a day, even if I only save 30 seconds a hit I have an extra 37.5 minutes a day of useful time...
I would write a tiny (and I mean TINY) app (in something besides access if at all possible) that your analysts can use.
Getting a screen capture from SSMS is going to be a nightmare. But consider this (I imagine it would save much time).
You could have an app with a single Rich Text Box and another standard text box to enter incident number. Then, your analysts could enter an incident number, paste their SQL code into the rich text box, and click a button to handle the entire file archiving process (creating the folder and what not). You can get analyst name from the analyst upon starting the app, or from the Windows domain login.
Hope this helps,
Alex
Ignorance of certain subjects is a great part of wisdom
Reading your post I was thinking the otherway than Alex...
You could switch to the app and have it do everything including put the path and file name on the clipboard. Then in SSMS, you could do a file save as and paste. I'm sure the browsing time is the worst.
I guess it all depends on what makes sense to you. Although, I must say I like Alex's recomendation because it is probably more flexible/generic.
Hey, sometimes it is a good thing when you can't have everything. Imagine a nasty little virus pasting 'drop database' queries into your SSMS windows ;-)
Ignorance of certain subjects is a great part of wisdom
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.