Click here to Skip to main content
15,898,222 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi friends,

i developed a C# and sqlserver 2008 program. and i want to use it in customer computer.first of all i installed sqlexpress in customer computer. then i added database files to program directiry but it does not work.how can i correct this probem.

there is a error message that appear when i want to log into program that it says:

SQL
a network-related or instance-specific error occured while establishing a connection to sqlserve. the server was not found or was not
accessible. verify that the instance name is correct and that sql server is configured to allow remote connections.
(provider:named pipes provider,error:40 - could not open a connection to sql server)
Posted

...i added database files to program directiry but it does not work.how can i correct this probem...

You need to move database files directly into SQL Server Data folder[^], then to attach this file[^] into MS SQL Server instance[^].

After that properly configure connection string[^] to this named instance.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900