noobe1
asked on
Newbie deploying VB.net / SQLExpress app
Hi Experts,
I developed an app using VB.net and SQLExpress. Now, I need to deploy my application. I have a few questions:
1) When the application is first installed on a server, how do I make SQLExpress attach the database
2) On client machine, I need to modify the connection strings in the config to point to the server. How do I determine the server's name?
3) Should I create two installer?? One for server and one for client machine?
4) If after installing the app on the server, how do I make changes to the db (ie add/delete table, columns etc..)??
I developed an app using VB.net and SQLExpress. Now, I need to deploy my application. I have a few questions:
1) When the application is first installed on a server, how do I make SQLExpress attach the database
2) On client machine, I need to modify the connection strings in the config to point to the server. How do I determine the server's name?
3) Should I create two installer?? One for server and one for client machine?
4) If after installing the app on the server, how do I make changes to the db (ie add/delete table, columns etc..)??
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
USE [master]
GO
CREATE DATABASE [RESUMEDB] ON
( FILENAME = N'C:\Program Files\XYZ\TestDB.mdf' ),
( FILENAME = N'C:\Program Files\XYZ\TestDB_log.ldf' )
FOR ATTACH
GO
if not exists (select name from master.sys.databases sd where name = N'TESTDB' and SUSER_SNAME(sd.owner_sid) = SUSER_SNAME() ) EXEC [TESTDB].dbo.sp_changedbow
GO
How do I make VB.net execute the script after installation is complete?
Thanks