Cannot connect from c# to sql locally but can remotely -


i have c# application want connect sql server , server , application used on same machine , application cannot connect sql if installed application on machine , keeping server in first server connected ! server installed on windows 8.

thanks

please following -

  1. make sure local database server has both windows authentication , sql server authentication mode enabled. but

if using windows authentication change connection string -

connectionstring="data source=lenovo;initial catalog=app;integrated security=true;" 

if using sql server authentication mode, seems since providing username

connectionstring="data source=lenovo;initial catalog=app;integrated security=false;user id=sa;password=111" 

also, app reserve keyword in systems. better avoid such name name of db.

if using default server instance can use . or (local) instead of lenovo


Comments

Popular posts from this blog

php - render data via PDO::FETCH_FUNC vs loop -

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

The canvas has been tainted by cross-origin data in chrome only -