Hi guys,
Please help me when i install my application on clients it only connect with one user like Naveed/Password on domain but when i login on domain by using other user it gives me connection error what should i modify in my connecting string.

"PMS.My.MySettings.ConnectionString" connectionString="Provider=SQLOLEDB;Data Source=ITS;Integrated Security=SSPI;Initial Catalog=Payment"

I mean i want to be able to connect sql server2008 through my VB.NET by any user.

Please help me,
Thanks in advance.

Actually you have one of 2 options. Either create a windows authentication login for each of your domain users and give them permission for reading or writing to the database, and then you can use the same connection you are using (you can reach that from the SQL enterprise manager "servername>security>logins" and fill the user name, domain and default database in the general tab, and specify rights in the database access tab).
The second option is creating one SQL server authentication using the above technique but choosing "SQL server authentication" instead of "Windows authentication", when saved you will be prompted for a password, after that adjust you connection string to read:

"PMS.My.MySettings.ConnectionString" connectionString="Provider=SQLOLEDB;Data Source=ITS;Integrated Security=SSPI;Initial Catalog=Payment;UID=xxusername;pwd=xxpassword"

where xxusername is the user name you created and xxpassword is the password.

Thanks alot for your response please tell me in connecting string should i pass UID and PASSWORD for ever user

Like "PMS.My.MySettings.ConnectionString" connectionString="Provider=SQLOLEDB;Data Source=ITS;Integrated Security=SSPI;Initial Catalog=Payment;UID=xxusername;pwd=xxpassword""PMS.My.MySettings.ConnectionString" connectionString="Provider=SQLOLEDB;Data Source=ITS;Integrated Security=SSPI;Initial Catalog=Payment;UID=USER1;pwd=PWD1"

and

"PMS.My.MySettings.ConnectionString" connectionString="Provider=SQLOLEDB;Data Source=ITS;Integrated Security=SSPI;Initial Catalog=Payment;UID=xxusername;pwd=xxpassword""PMS.My.MySettings.ConnectionString" connectionString="Provider=SQLOLEDB;Data Source=ITS;Integrated Security=SSPI;Initial Catalog=Payment;UID=User2;pwd=PWD2"

In case you used windows authentication no need to pass user name or password. In case of SQL authentication you can create one username for all the users and use it. In all cases no you don't need to include all the user names.
So in the first case your code will look like:

"PMS.My.MySettings.ConnectionString" connectionString="Provider=SQLOLEDB;Data Source=ITS;Integrated Security=SSPI;Initial Catalog=Payment"

while in the second case

"PMS.My.MySettings.ConnectionString" connectionString="Provider=SQLOLEDB;Data Source=ITS;Integrated Security=SSPI;Initial Catalog=Payment;UID=xxCommonSQLUserName;pwd=xxCommonPassword"
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.