This repository has been archived by the owner on Dec 1, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
SqlClient Configuration (Windows Applications)
Aleksey Nemiro edited this page Apr 3, 2014
·
5 revisions
Special configuration for Nemiro.Data class library is not required.
But it is recommended add to configuration file a connection string with name LocalSqlServer.
Open a Project properties.
Click the Settings tab. Create a configuration file, if necessary.
Add new setting name LocalSqlServer and set yout connection string to the setting value.
This will avoid specifying the connection string in a code.
Enjoy!
And also you can use additional parameters to configure the behavior of the SqlClient class.
The list of settings for the SqlClient class:
Parameter name | Values | Description |
---|---|---|
NeDataSqlConnectionMode | Auto (default), Manual | Default connection mode. Automatically open and close a database connection (default) or automatically open and manual close a database connection. |
NeDataSqlCommandType | Auto (default), StoredProcedure, TableDirect, Text | Default command type for CommandText . |
NeDataSqlCacheType | None, Auto (default), Web, File, Memory, Custom | Default caching type. |
NeDataSqlCacheDuration | Integer | Default duration of storage in the cache entry (in seconds). Not recommended. |
NeDataSqlCachePath | String | Default path of storage a cache files. |
NeDataSqlCacheBinder | String | Default type serializer of custom objects. Expected type name. For example: MyNamespace.MyCacheBinder
|
NeDataSqlCacheBufferSize | Integer | Default memory buffer size (Kb) of the file cache. |
NeDataSqlCacheBufferAccessTimeout | String | Waiting time gain access to the buffer of the file cache. TimeSpan string. For example: 0.00:00:00.500 - 0 days, 0 hours, 0 minutes, 0 seconds, 500 milliseconds. Default value is: 0.00:00:00.0 (TimeSpan.Zero) |
NeDataSqlCacheAccessTimeout | String | Default waiting time gain access to the entry of the file cache. TimeSpan string. For example: 0.00:00:00.500 - 0 days, 0 hours, 0 minutes, 0 seconds, 500 milliseconds. Default value is: 0.00:00:00.0 (TimeSpan.Zero) |
NeDataSqlCacheCustom | String | Default type of custom cache. Expected type name. For example: MyNamespace.MyCache
|
NeDataSqlCacheCustomArgs | String | Additional parameters for initialization custom cache. Parameters are separated by a comma. For example: test, 123
|
For example: