how to run a sql file using ado.net?

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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.
 
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.
 
Back
Top