Sunday, 15 April 2012

c# - Data Source setting in Connection String -



c# - Data Source setting in Connection String -

consider these 2 connection strings different info source settings:

data source=oem-pc\sqlexpress;initial catalog=<databasename>; integrated security=false;persist security info=false; user id=<userid>;password=<password>;connect timeout=30 info source=.;initial catalog=<databasename>; integrated security=false;persist security info=false; user id=<userid>;password=<password>;connect timeout=30

why when utilize first, thrown error

login failed user reason: effort login using sql authentication failed. server configured windows authentication only. [client: ]

i'm using sql server 2008 express , server configured mixed authentication , i've tripled check using

(a) master.dbo.xp_instance_regread, (b) serverproperty() and (c) master.sys.xp_loginconfig.

also, enabling sa login doesn't create difference.

let me know if additional info required. thanks.

sounds have several different instances of sql server installed.

the default 1 (also accessed using .) has sql authentication setup , enabled, sqlexpress instance doesn't.

use sql server configuration manager find out instances have , configure them correctly.

c# sql-server-2008 connection-string

No comments:

Post a Comment