how to run a sql file using ado.net?

G

Guest

Hello, everyone

I have a web application that includes a SQL database. we used to install the database seperately since it needs to be installed on another computer.
I want to write a window application that can be added in the Custom action of the Web set up project, but it seems I can not use ado.net to run the sql file to create the database.
Could any one help? I do appreciate it.
or anyone can tell me how to write a .cmd file(I have never written it) to install the sql database and allow user to select which SQL server to hold the database

Thanks a lot

Haiwen
 
F

Felix Wang

Hello Haiwen,

Thanks for posting. I believe the following walkthrough will be useful to
you:

Walkthrough: Using a Custom Action to Create a Database During Installation
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsintro7/ht
ml/vxwlkWalkthroughUsingCustomActionToCreateDatabaseDuringInstallation.asp

I hope this helps.

Regards,

Felix Wang
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
F

Felix Wang

Hi Haiwen,

Should you have any concerns or new findings regarding this issue, please
feel free to post here.

Have a nice day.

Regards,

Felix Wang
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top