Changing ConnectionString
-
I have created DataSet, and through adapters I wannt to connect with the data base.. but due to connectionstring it prevent me to connect successfully, because the password is not in the connnectionString . Now I want to change the connectionString from Data Source=BaharAli-PC;Initial Catalog=Radiology;User ID=sa to Data Source=BaharAli-PC;Initial Catalog=Radiology;User ID=sa;Password=abc So plz help me, how can i do it.
-
I have created DataSet, and through adapters I wannt to connect with the data base.. but due to connectionstring it prevent me to connect successfully, because the password is not in the connnectionString . Now I want to change the connectionString from Data Source=BaharAli-PC;Initial Catalog=Radiology;User ID=sa to Data Source=BaharAli-PC;Initial Catalog=Radiology;User ID=sa;Password=abc So plz help me, how can i do it.
Where did u created the connection string ? What is the problem to change the connectionString ?
Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you.
-
I have created DataSet, and through adapters I wannt to connect with the data base.. but due to connectionstring it prevent me to connect successfully, because the password is not in the connnectionString . Now I want to change the connectionString from Data Source=BaharAli-PC;Initial Catalog=Radiology;User ID=sa to Data Source=BaharAli-PC;Initial Catalog=Radiology;User ID=sa;Password=abc So plz help me, how can i do it.
-
Where did u created the connection string ? What is the problem to change the connectionString ?
Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you.
Bro I created a DataSet file. I added adapters on it. but when i trying to connect with the data base, the error is looks like this.. Login failed for user 'sa'. I have another database connetion which connect sucessfully but i have added the password in the connectionstring.
-
Bro I created a DataSet file. I added adapters on it. but when i trying to connect with the data base, the error is looks like this.. Login failed for user 'sa'. I have another database connetion which connect sucessfully but i have added the password in the connectionstring.
I don't remember the exact thing, but the time i was adding the first adapter on dataset file, they ask me to exclude password for some security reason. and i excluded the password at that time.
-
Bro I created a DataSet file. I added adapters on it. but when i trying to connect with the data base, the error is looks like this.. Login failed for user 'sa'. I have another database connetion which connect sucessfully but i have added the password in the connectionstring.
sparlay_pk wrote:
the error is looks like this.. Login failed for user 'sa'.
Does the Database having the access of that Sa. Please check the database security settings from SQL Sever Management Studio. Are you able to login in SSMS using the same user name and password that you are using in your application ?
Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you.
-
sparlay_pk wrote:
the error is looks like this.. Login failed for user 'sa'.
Does the Database having the access of that Sa. Please check the database security settings from SQL Sever Management Studio. Are you able to login in SSMS using the same user name and password that you are using in your application ?
Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you.
Yes it works for username sa and password abc... The time I am including new queries with adapter it shows data correctly. Also if i click on any adapter to preview data it works...
-
Where have you defined that? How are you trying to change it?
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
Thanks Bro. I solved the problem...
-
I have created DataSet, and through adapters I wannt to connect with the data base.. but due to connectionstring it prevent me to connect successfully, because the password is not in the connnectionString . Now I want to change the connectionString from Data Source=BaharAli-PC;Initial Catalog=Radiology;User ID=sa to Data Source=BaharAli-PC;Initial Catalog=Radiology;User ID=sa;Password=abc So plz help me, how can i do it.
Thanks Bro. I do it..
-
Thanks Bro. I do it..
-
I have created DataSet, and through adapters I wannt to connect with the data base.. but due to connectionstring it prevent me to connect successfully, because the password is not in the connnectionString . Now I want to change the connectionString from Data Source=BaharAli-PC;Initial Catalog=Radiology;User ID=sa to Data Source=BaharAli-PC;Initial Catalog=Radiology;User ID=sa;Password=abc So plz help me, how can i do it.
you can refer the connection strings provided here www.connectionstrings.com Refer below article, it will let you create users and their roles in your MS SQL DB http://www.eggheadcafe.com/tutorials/aspnet/c4fa77c9-c3bb-4c16-b4ae-3be0ec6d760e/sql-server-security.aspx[^]