Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have problems in understang connection strings. what do they use for? (i can see it in samples but can't understand why they are there)

should i build my own connection strings or should i use only tamplets?

Posted

Connection Strings

 

The primary property associated with a connection object is the ConnectionString property, which consists of a string with attribute/value pairs for information required to log on to a database and point to a specific database. A typical ConnectionString property might look like the following:

 

Provider=SQLOLEDB.1;Data Source=MySQLServer;Initial Catalog=NORTHWIND;Integrated Security=SSPI

This particular connection string specifies that the connection should use Windows integrated security (NT authentication). A connection string can instead include a user id and password, but this is generally not recommended, because these attributes are then compiled into your application and therefore a potential security breach. For more information, see Security Model.

 

The most common attribute/value pairs used by OLE DB are also represented separately by an individual property, such as DataSource and Database (and, optionally, UserId, and Password). When working with a connection object, you can either set the ConnectionString property as a single string, or you can set individual connection properties. (If your data source requires connection-string values that are not represented by individual properties, then you must set the ConnectionString property.) Alternatively, you can also set the ConnectionString property to the path of a Microsoft Data Link (.udl) file.

The one and only

Dr. Madz

eee-m@il

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...