What is the connection string "connectionString"?

8

What is the connection string anyway?

In a connection string which represents data-source ?

And the provider name ?

    
asked by anonymous 22.04.2016 / 20:02

2 answers

8

It is text that passes the information needed for the database to establish a connection to the application. Obviously need the address (usually includes the port) where the bank is, what type it is, the form of connection, the user, password, etc.

Just remembering that it is best to avoid the use of username and password, it is better to use another type of safer authentication. But if you use, at least be encrypted.

You have a website dedicated to this .

The Data Source is where the data is. has several ways of indicating the location, it can be an IP, for example. It is the same as Server , Address , among others.

ProviderName is not part of the string connection. This may be in the configuration file . It places the DLL that will be used as a database access client. It is in her that has the codes that will establish the connection and all communication of access to the data. This helps define which database will be used and which connection texts will be valid.

    
22.04.2016 / 20:15
1

You can create the connection string using a .udl extension file. Just create a text file, change the extension to "udl", open the configure file with the data to connect with your bank (Host, username, pass), save this file, change to .txt, open and copy the text in there . Your connection string is ready :) Thanks.

    
22.04.2016 / 20:58