July 2008
Intermediate to advanced
1026 pages
27h 59m
English
Probably the most familiar data provider is the SQL Server database provider, so Table 39-1 details some of the common connection properties you may need to specify to connect to your database server.
| Connection Property | Description |
|---|---|
| Asynchronous Processing | Determines whether the connection will support asynchronous database calls. Most applications try to deliver a responsive user interface, so it is important for it not to freeze when retrieving data. In the past this could only be achieved by doing the data processing in a separate thread from the user interface. The data access methods, such as ExecuteNonQuery, now support calls using the Begin and End asynchronous pattern. For example, BeginExecuteNonQuery will return immediately so the user interface does not block while the data access is performed. |
| AttachDBFilename | Introduced in SQL Server 2005, this property means you can work with databases that aren't permanently attached to a SQL Server instance. This property is a path reference to the primary database file that contains the database. Specifying AttachDBFilename effectively attaches and detaches the database when required. |
| Connect Timeout | Determines the maximum length of time that the Open method will block when attempting to connect to the database. This should not be confused with the Timeout property on the SQLCommand class, which determines the timeout for a given command to execute. |
| Data Source | The host ... |
Read now
Unlock full access