Mimer SQL Data Provider
How to convert from OLE DB
Mimer SQL Data Provider > Overview > Converting an application to Mimer SQL Data Provider > How to convert from OLE DB

To convert an existing OLE DB application based on ADO.NET to the Mimer SQL Data Provider you need to take the following steps:

  1. Replace all occurrences of System.Data.OleDb with Mimer.Data.Client. This includes both using clauses and references that use full names.

  2. Locate all references to OleDbType and decide how to map these. The table below gives guidelines for data type mapping.

  3. Replace all object references with prefix OleDb to prefix Mimer, which is used by the Mimer SQL Data Provider.

  4. Recompile your application. When you recompile the application you may discover that there are OLE DB specific functions that are used by the application. You must consider how to handle these.

  5. In the ConnectionString property of the MimerConnection object, choose the desired database. The OLE DB connection string properties should be converted to the appropriate Mimer connection string properties

  6. Test your application thoroughly.

 

OleDbType Corresponding MimerDbType
BigInt

A 64-bit signed integer (DBTYPE_I8).

BigInt
Binary

A stream of binary data (DBTYPE_BYTES).

VarBinary
Boolean

A Boolean value (DBTYPE_BOOL).

Boolean
BSTR

A null-terminated character string of Unicode characters (DBTYPE_BSTR).

NVarChar
Char

A character string (DBTYPE_STR).

Char
Currency

A currency value ranging from -263 (or -922,337,203,685,477.5808) to 2 63 -1 (or +922,337,203,685,477.5807) with an accuracy to a ten-thousandth of a currency unit (DBTYPE_CY).

Decimal
Date

Date data, stored as a double (DBTYPE_DATE). The whole portion is the number of days since December 30, 1899, while the fractional portion is a fraction of a day.

Date
DBDate

Date data in the format yyyymmdd (DBTYPE_DBDATE).

Date
DBTime

Time data in the format hhmmss (DBTYPE_DBTIME).

Time
DBTimeStamp

Data and time data in the format yyyymmddhhmmss (DBTYPE_DBTIMESTAMP).

Timestamp
Decimal

A fixed precision and scale numeric value between -1038 - 1 and 10 38 - 1 (DBTYPE_DECIMAL).

Decimal
Double

A floating point number within the range of -1.79E +308 through 1.79E +308 (DBTYPE_R8).

Double
Empty

No value (DBTYPE_EMPTY).

No corresponding type.
Error

A 32-bit error code (DBTYPE_ERROR).

No corresponding type as OleDb maps this to an Exception.
Filetime

A 64-bit unsigned integer representing the number of 100-nanosecond intervals since January 1, 1601 (DBTYPE_FILETIME).

If the data type in the application uses DateTime a Timestamp may be used.
Guid

A globally unique identifier (or GUID) (DBTYPE_GUID).

Guid
IDispatch

A pointer to an IDispatch interface (DBTYPE_IDISPATCH).

Note   This data type is not currently supported by ADO.NET. Usage may cause unpredictable results.
No corresponding type.
Integer

A 32-bit signed integer (DBTYPE_I4).

Int
IUnknown

A pointer to an IUnknown interface (DBTYPE_UNKNOWN).

Note   This data type is not currently supported by ADO.NET. Usage may cause unpredictable results.
No corresponding type.
LongVarBinary

A long binary value.

Blob
LongVarChar

A long string value.

Clob
LongVarWChar

A long null-terminated Unicode string value.

NClob
Numeric

An exact numeric value with a fixed precision and scale (DBTYPE_NUMERIC).

Decimal
PropVariant

An automation PROPVARIANT (DBTYPE_PROP_VARIANT).

Object
Single

A floating point number within the range of -3.40E +38 through 3.40E +38 (DBTYPE_R4).

Real
SmallInt

A 16-bit signed integer (DBTYPE_I2).

SmallInt
TinyInt

A 8-bit signed integer (DBTYPE_I1).

SmallInt or DbType.SByte
UnsignedBigInt

A 64-bit unsigned integer (DBTYPE_UI8).

No corresponding type, use DbType.UInt64.
UnsignedInt

A 32-bit unsigned integer (DBTYPE_UI4).

No corresponding type, use DbType.UInt32.
UnsignedSmallInt

A 16-bit unsigned integer (DBTYPE_UI2).

No corresponding type, use DbType.UInt16.
UnsignedTinyInt

A 8-bit unsigned integer (DBTYPE_UI1).

This maps to Byte. No corresponding type, use DbType.Byte.
VarBinary

A variable-length stream of binary data.

VarBinary
VarChar

A variable-length stream of non-Unicode characters.

VarChar
Variant

A special data type that can contain numeric, string, binary, or date data, as well as the special values Empty and Null (DBTYPE_VARIANT). This type is assumed if no other is specified.

Object
VarNumeric

A variable-length numeric value.

Decimal
VarWChar

A variable-length, null-terminated stream of Unicode characters.

NVarChar
WChar

A null-terminated stream of Unicode characters (DBTYPE_WSTR).

NChar
See Also

Reference