SqlCeConnection::GetDatabaseInfo Method
Visual Studio 2010
Returns a set of Key Value pairs with information about locale, encryption mode, and case-sensitivity setting of the connected database.
Namespace: System.Data.SqlServerCe
Assembly: System.Data.SqlServerCe (in System.Data.SqlServerCe.dll)
[SecurityCriticalAttribute] [SecurityTreatAsSafeAttribute] [SecurityPermissionAttribute(SecurityAction::Assert, UnmanagedCode = true)] public: List<KeyValuePair<String^, String^>>^ GetDatabaseInfo()
Return Value
Type: System.Collections.Generic::List<KeyValuePair<String, String>>Sorted list with the name value pairs of locale, encryption mode, and case sensitivity.
For more information about the encryption options, platform default and engine default, see Encrypting a Database
The following example uses the GetDatabaseInfo to retrieve the database properties of Northwind.sdf. The SqlCeConnection is passed a connection string and then opens a connection to the database. Once the connection is open, the contents of GetDatabaseInfo is stored in a KeyValuePair and displayed on the console.
Show: