PDA

View Full Version : VBA-SqlServer: stored procedures, jobs



lalbatros
08-30-2007, 03:58 AM
Hello, might be simple but I don't even know if it is possible.

Would it be possible from a VBA-project in Access to:

- launch a stored procedure on the server
- launch a job of the server

Could save me a lot of time ...

Thanks

Brandtrock
08-30-2007, 09:58 PM
Check this (http://www.pcreview.co.uk/forums/thread-1624730.php)out for question 1.

Not sure about question 2, but this (http://www.databasejournal.com/scripts/article.php/3646706)may point you in the right direction.

Hope this helps,

lalbatros
08-30-2007, 11:58 PM
Thanks Brandtrock.

My target stored procedure is stored on the server.
I wonder how I could use it.

Launching a SP from the Connection.Execute method is convenient,
but in some cases it makes code management a bit obscure.
That's why I would like to leave the SP on the server, in my special case.

Sometimes it is more convenient to handle the SP in the code.
Specially when this SP changes a lot depending on some user input.

Bob Phillips
08-31-2007, 03:53 AM
For what it is worth, we have always found it far easier to use stored procedures and manintain them in the DB, rather than do it all from code.

You can always the code obscurity by writing a more user-friendly class, and use that class to access the SP.