Pass Connection String to SQL2005 Fail!
Dear Sir:
I used pass connection string to SQL2005 fail,
but pass connection string to SQL2000 suucess,
my connection string as follow
SQL2005 :
string CONN =Data Source=192.168.1.51\SQLEXPRESS;AttachDbFilename=;Initial Catalog=db;Integrated Security=False;Persist Security Info=True;User ID=s;Password=a;
SQL2000 :
string CONN = "Data Source=192.168.1.51;AttachDbFilename=;Initial Catalog=db;Integrated Security=False;Persist Security Info=True;User ID=s;Password=a;
There are different Only "Data Source=192.168.1.51\SQLEXPRESS", Others are same,
and i had show this connection string in report, it was wrok,
but i replace with "ConnectionStringExpression" property, then SQL can't connect,
what's wrong?
Thank you!
I used pass connection string to SQL2005 fail,
but pass connection string to SQL2000 suucess,
my connection string as follow
SQL2005 :
string CONN =Data Source=192.168.1.51\SQLEXPRESS;AttachDbFilename=;Initial Catalog=db;Integrated Security=False;Persist Security Info=True;User ID=s;Password=a;
SQL2000 :
string CONN = "Data Source=192.168.1.51;AttachDbFilename=;Initial Catalog=db;Integrated Security=False;Persist Security Info=True;User ID=s;Password=a;
There are different Only "Data Source=192.168.1.51\SQLEXPRESS", Others are same,
and i had show this connection string in report, it was wrok,
but i replace with "ConnectionStringExpression" property, then SQL can't connect,
what's wrong?
Thank you!
Comments
If you use ConnectionStringExpression property, you should pass the string with quotes and @ symbol:
ConnectionStringExpression = @Data Source=192.168.1.51......