How to execute particular sql function in all databases of particular pC?
using frontend application using c#.
I have written one function in one datbase,
My Requiremment is i want to execute that function in all databases of server
using frontend app.
select database(dropdown)
execute function for that database(here execute is button)
How to do this?
any idea?
thanks inadvance
Loading
Prabhu RajaPosted Sep 9, 2011, 7:07 AM
First We have to give permission for all databases to call that function. Use following query to grant permission to the function.
Satish BhatPosted Sep 9, 2011, 6:43 AM
2] Take the database names from the master table and display in a dropdown list.
3] When user selects a particular database, you can get the login/connection information from master table for the selected database, build a connection string, connect and execute the function with required parameters.