How To Create DataBase On The Fly?
-
Basically i m creating a web based installer where users will create database and execute sqlscript on there hosting server, that y i need hosting server ip, uid, pwd from user. The create database dbname will run for the first time to create the database then executing sqlscript will create structure in that database. thats y i m confused how to create DB on the fly. Any help will be appreciated. Thanks in advance.
-
Basically i m creating a web based installer where users will create database and execute sqlscript on there hosting server, that y i need hosting server ip, uid, pwd from user. The create database dbname will run for the first time to create the database then executing sqlscript will create structure in that database. thats y i m confused how to create DB on the fly. Any help will be appreciated. Thanks in advance.
You can take the IP of the server from the user (hosting server must give rights for installing) along with user name and password. And run your scripts to generate database by calling a web service resident on your server.
Ahsan Ullah Senior Software Engineer
-
Basically i m creating a web based installer where users will create database and execute sqlscript on there hosting server, that y i need hosting server ip, uid, pwd from user. The create database dbname will run for the first time to create the database then executing sqlscript will create structure in that database. thats y i m confused how to create DB on the fly. Any help will be appreciated. Thanks in advance.
It sounds to me like what you need is a custom action dll that can be called by the installer to create the database. Custom actions DLLs are added to the WebSetup Project using Custom Actions Editor. You will also need to use the User Interface Editor to add some dialog that allow the user to enter some of the parameters like uid, pwd. The installer will then use the parameters to access/run the database scripts
-
It sounds to me like what you need is a custom action dll that can be called by the installer to create the database. Custom actions DLLs are added to the WebSetup Project using Custom Actions Editor. You will also need to use the User Interface Editor to add some dialog that allow the user to enter some of the parameters like uid, pwd. The installer will then use the parameters to access/run the database scripts
You can look up how to use custom actions from here http://www.simple-talk.com/dotnet/visual-studio/visual-studio-setup---projects-and-custom-actions/[^]