Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between SqlConnection and SqlConnectionStringBuilder

I would like to know what is different between SqlConnection and SqlConnectionStringBuilder

like image 201
senthilkumar2185 Avatar asked Mar 13 '26 07:03

senthilkumar2185


1 Answers

Apples and Oranges.

SqlConnection actually controls the connection to the database.

SqlConnectionStringBuilder helps to dynamically create the connection string used in the SqlConnection.

http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection(v=vs.110).aspx

http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnectionstringbuilder(v=vs.110).aspx

like image 154
TyCobb Avatar answered Mar 14 '26 20:03

TyCobb



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!