Configuration

Overview

Contains information about all known ADO.NET providers and database providers with which Data Abstract for .NET can work.

Note: The Configuration static class is loaded at the start up of a server through the use of one of the multiple Load* overloads (by default the Load parameter), and is then used by most of the other classes contained in the RemObjects.DataAbstract.Server assembly. The Data Abstract server templates include the code needed to load the configuration.

Location

 

DatabaseProfiles

Provides access to all the database profiles known to the server application.

 

class property DatabaseProfiles: RemObjects.Common.Collections.NamedObjectCollection<DatabaseProfile> read;

 

class RemObjects.Common.Collections.NamedObjectCollection<DatabaseProfile> DatabaseProfiles { get; }

 

Shared ReadOnly Property DatabaseProfiles() As RemObjects.Common.Collections.NamedObjectCollection<DatabaseProfile>

DataProviders

Provides access to all the ADO.NET providers known to the server application.

 

class property DataProviders: RemObjects.Common.Collections.NamedObjectCollection<DataProviderInfo> read;

 

class RemObjects.Common.Collections.NamedObjectCollection<DataProviderInfo> DataProviders { get; }

 

Shared ReadOnly Property DataProviders() As RemObjects.Common.Collections.NamedObjectCollection<DataProviderInfo>

Load

Loads a Data Abstract configuration using the default mechanism, which looks in several places for a valid .daConfig file: * as a DataAbstract.daConfig file next to your application's executable * as a DataAbstract.daConfig resource in your application's executable * as a resource in RemObjects.DataAbstract.Server.dll If your application does not provide a custom DataAbstract.daConfig, either as file or as embedded resource, the default configuration will be used from inside the Data Abstract dll.

Note: In most scenarios, you would use this Load method to load the configuration, as it provides the most flexibility. However, you can also use the LoadFromFile, LoadFromResource or LoadFromXml methods to load the configuration from a more specific location.

You can also call LoadFromResource without parameter, to have it look for a resource in your application's executable or the Data Abstract dll, but prevent a configuration from being loaded from an external file.

 

class method Load

 

static void Load()

 

Shared Sub Load()

Loaded

Returns a Boolean value indicating if the Configuration class has loaded a configuration file or resource, yet. A configuration must be loaded before a Data Abstract server application is ready to access data, usually using the parameter-less Load() method.

 

class property Loaded: Boolean read;

 

class Boolean Loaded { get; }

 

Shared ReadOnly Property Loaded() As Boolean

LoadFromFile

 

class method LoadFromFile

 

static void LoadFromFile()

 

Shared Sub LoadFromFile()

LoadFromFile (String)

Loads a Data Abstract configuration from the specified file. If the filename is empty, the configuration will be loaded from a DataAbstract.daConfig file next to your application's executable.

Note: LoadFromFile does not fall back to load the configuration from a resource if the file is not found; if the .daConfig cannot be located as specified, an exception will be thrown.

 

class method LoadFromFile(aFileName: String)

 

static void LoadFromFile(String aFileName)

 

Shared Sub LoadFromFile(aFileName As String)

Parameters:

  • aFileName:

LoadFromResource

 

class method LoadFromResource

 

static void LoadFromResource()

 

Shared Sub LoadFromResource()

LoadFromResource (String)

Loads a Data Abstract configuration from a resource in the application's executable. If your application does not provide a custom DataAbstract.daConfig as embedded resource, the default configuration will be used from inside the Data Abstract dll.

Note: You can also call LoadFromResource without parameter, to have it look for a resource in your application's executable or the Data Abstract dll, but prevent a configuration from being loaded from an external file.

 

class method LoadFromResource(resourceName: String)

 

static void LoadFromResource(String resourceName)

 

Shared Sub LoadFromResource(resourceName As String)

Parameters:

  • resourceName:

LoadFromXml

Loads a Data Abstract configuration from the specified IXMLDocument. Use this method if you want to obtain the configuration by other means than from a local file or a resource.

 

class method LoadFromXml(aXmlDocument: XmlDocument)

 

static void LoadFromXml(XmlDocument aXmlDocument)

 

Shared Sub LoadFromXml(aXmlDocument As XmlDocument)

Parameters:

  • aXmlDocument:

 

DatabaseProfiles

Provides access to all the database profiles known to the server application.

 

class property DatabaseProfiles: RemObjects.Common.Collections.NamedObjectCollection<DatabaseProfile> read;

 

class RemObjects.Common.Collections.NamedObjectCollection<DatabaseProfile> DatabaseProfiles { get; }

 

Shared ReadOnly Property DatabaseProfiles() As RemObjects.Common.Collections.NamedObjectCollection<DatabaseProfile>

DataProviders

Provides access to all the ADO.NET providers known to the server application.

 

class property DataProviders: RemObjects.Common.Collections.NamedObjectCollection<DataProviderInfo> read;

 

class RemObjects.Common.Collections.NamedObjectCollection<DataProviderInfo> DataProviders { get; }

 

Shared ReadOnly Property DataProviders() As RemObjects.Common.Collections.NamedObjectCollection<DataProviderInfo>

Loaded

Returns a Boolean value indicating if the Configuration class has loaded a configuration file or resource, yet. A configuration must be loaded before a Data Abstract server application is ready to access data, usually using the parameter-less Load() method.

 

class property Loaded: Boolean read;

 

class Boolean Loaded { get; }

 

Shared ReadOnly Property Loaded() As Boolean

 

Load

Loads a Data Abstract configuration using the default mechanism, which looks in several places for a valid .daConfig file: * as a DataAbstract.daConfig file next to your application's executable * as a DataAbstract.daConfig resource in your application's executable * as a resource in RemObjects.DataAbstract.Server.dll If your application does not provide a custom DataAbstract.daConfig, either as file or as embedded resource, the default configuration will be used from inside the Data Abstract dll.

Note: In most scenarios, you would use this Load method to load the configuration, as it provides the most flexibility. However, you can also use the LoadFromFile, LoadFromResource or LoadFromXml methods to load the configuration from a more specific location.

You can also call LoadFromResource without parameter, to have it look for a resource in your application's executable or the Data Abstract dll, but prevent a configuration from being loaded from an external file.

 

class method Load

 

static void Load()

 

Shared Sub Load()

LoadFromFile

 

class method LoadFromFile

 

static void LoadFromFile()

 

Shared Sub LoadFromFile()

LoadFromFile (String)

Loads a Data Abstract configuration from the specified file. If the filename is empty, the configuration will be loaded from a DataAbstract.daConfig file next to your application's executable.

Note: LoadFromFile does not fall back to load the configuration from a resource if the file is not found; if the .daConfig cannot be located as specified, an exception will be thrown.

 

class method LoadFromFile(aFileName: String)

 

static void LoadFromFile(String aFileName)

 

Shared Sub LoadFromFile(aFileName As String)

Parameters:

  • aFileName:

LoadFromResource

 

class method LoadFromResource

 

static void LoadFromResource()

 

Shared Sub LoadFromResource()

LoadFromResource (String)

Loads a Data Abstract configuration from a resource in the application's executable. If your application does not provide a custom DataAbstract.daConfig as embedded resource, the default configuration will be used from inside the Data Abstract dll.

Note: You can also call LoadFromResource without parameter, to have it look for a resource in your application's executable or the Data Abstract dll, but prevent a configuration from being loaded from an external file.

 

class method LoadFromResource(resourceName: String)

 

static void LoadFromResource(String resourceName)

 

Shared Sub LoadFromResource(resourceName As String)

Parameters:

  • resourceName:

LoadFromXml

Loads a Data Abstract configuration from the specified IXMLDocument. Use this method if you want to obtain the configuration by other means than from a local file or a resource.

 

class method LoadFromXml(aXmlDocument: XmlDocument)

 

static void LoadFromXml(XmlDocument aXmlDocument)

 

Shared Sub LoadFromXml(aXmlDocument As XmlDocument)

Parameters:

  • aXmlDocument: