hello every one
I made setup for an application containing database built by sql server express edition

I made the connection string dynamically taken from
Application.StartupPath

but when trying to install it on a different PC , i got the following exception..

an error has occured while establishing a connection to the server
when connecting to sql server 2005 the failure may be caused by the fact thatunder the default settings sql server does not allow remote connections(provider:sql network interfaces error:26-error locating server/instance specified)

any ideas .?
thanks in advance

I read somewhere (maybe even on this site!) that express editions don't allow remote connections.

How to configure SQL Server 2005 to allow remote connections

By default the express editions of MSSQL don't enable remote connections. You can enable it after installation or specify to allow remote connections at installation time:

setup.exe /qb ADDLOCAL=SQL_Engine,SQL_Data_Files,SQL_Replication,Client_Components,Connectivity,SQL_SSMSEE INSTANCENAME=InstanceName SAVESYSDB=1 SQLBROWSERAUTOSTART=1 SQLAUTOSTART=1 AGTAUTOSTART=1 SECURITYMODE=SQL SAPWD=password DISABLENETWORKPROTOCOLS=0 ERRORREPORTING=1 SQMREPORTING=0 ADDUSERASADMIN=1 INSTALLSQLDIR="%ProgramFiles%\Microsoft SQL Server\"
commented: sql express enable remote connections?--this guy knows everything!!! +1
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.