sql server - C# Windows Form Application with Database not running on Client's System -


i have developed windows form application in c# uses sql server database connectivity. developed in .net framework 4.0 , sql server 2008 r2. application using local database present in root directory of application called ag.mdf.

this connection string:

data source=.;attachdbfilename=|datadirectory|\\ag.mdf;integrated     security=true;user instance=true  

i created installer adding setup project inside visual studio installer template new project in application. build setup project , created installer me. deployed application on user's system, application starts pops error

unhandled exception has occurred in application. if click continue, application ignore message , attempt continue. if click quit, application close immediately.

a network-related or instance-specific error occurred while establishing connection sql server. server not found or not accessible. verify instance name correct , sql server configured allow remote connections. (provider: named pipes provider, error: 40 - not open connection sql server)

p.s: have installed .net framework 4.0 , sql server compact edition on user's system well!

should quit programming :'(

i think might getting express edition , compact edition confused; they're quite different.

compact edition takes sdf database file, , embedded database, not separate server. don't think can work mdf directly @ - might able export mdf sdf though.

sqlce doesn't know user instances, integrated security, or database attachments. think you'd need path sdf file directly in data source section, need be sdf, not mdf.

so basically, looks you're installing compact edition, using connect strings , data files full/express edition, isn't work.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -