SqlMetadataStore.CreateStore Method (String, CultureInfo)
Creates a metadata store file that has the specified name, location, and locale; and returns a metadata store object that represents it.
Namespace: Microsoft.Synchronization.MetadataStorage
Assembly: Microsoft.Synchronization.MetadataStorage (in microsoft.synchronization.metadatastorage.dll)
Syntax
'Declaration
Public Shared Function CreateStore ( _
fileName As String, _
locale As CultureInfo _
) As SqlMetadataStore
'Usage
Dim fileName As String
Dim locale As CultureInfo
Dim returnValue As SqlMetadataStore
returnValue = SqlMetadataStore.CreateStore(fileName, locale)
public static SqlMetadataStore CreateStore (
string fileName,
CultureInfo locale
)
public:
static SqlMetadataStore^ CreateStore (
String^ fileName,
CultureInfo^ locale
)
public static SqlMetadataStore CreateStore (
String fileName,
CultureInfo locale
)
public static function CreateStore (
fileName : String,
locale : CultureInfo
) : SqlMetadataStore
Parameters
- fileName
The file path and file name for the database file. The file path must exist before this method is called. The file path can be a relative path. In this case, it is relative to the current directory.
- locale
The locale to use to create the database.
Return Value
The metadata store object that represents the database.
Exceptions
Exception type | Condition |
---|---|
fileName or locale is a null reference (Nothing in Visual Basic). |
|
fileName is 0 length. |
|
fileName is longer than 260 characters. |
|
The directory that is specified in fileName does not exist. |
|
The metadata store could not be created. |
Remarks
This method creates a new metadata store. To open an existing metadata store, use OpenStore.
Security Note |
---|
The metadata file is not secured against unauthorized access. To help protect the metadata file, the folder that contains it must be properly secured, such as by using a Discretionary Access Control List (DACL). To allow the user to delete the metadata file, the provider that creates the metadata file should put it somewhere the user can access. The provider that creates the metadata file must delete the metadata file when the provider is uninstalled. |
Security Note |
---|
When Sync Framework opens the metadata file by a remote mechanism, such as a UNC path, the metadata file cannot be simultaneously accessed by any other application on any computer, including an application on the machine where the metadata file is stored. |
See Also
Reference
SqlMetadataStore Class
SqlMetadataStore Members
Microsoft.Synchronization.MetadataStorage Namespace