How do I publish a .net c# project with a SQL Server database on another computer? -
i want publish desktop application in host computer. tried publishing sql server compact didn't work. changes should make in visual studio , sql server can install application in computer?
what changes should make connection information shown here?
private void frmlogin_load(object sender, eventargs e) { globalconnection.strserver = "myserver\\sqlexpress"; globalconnection.strpwd = "123456"; globalconnection.strdatabase = "nus"; globalconnection.struid = "sa"; globalconnection.setupconnection(); }
if sql server express installed on target computer, have enabled "sa" account (it should disabled default) , set password "123456" "sa" account, , sql server express instance name sqlexpress
, can modify connection information target local computer (regardless of name).
globalconnection.strserver = ".\\sqlexpress";
if looking @ how automatically deploy , setup target machine, there quite few ways, outline generic method here:
- installer can automate installation , configuration of sql server express (typically different app specific user account, not "sa" one).
- install desktop application , create shortcut it,
- config information should targeting local machine through use of
.
, sql server instance name automation in first step , using either windows auth or custom user account/pwd auto-created.
this pretty generic overview have provided, helps point in right direction.
Comments
Post a Comment