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 -
- 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
Post a Comment