Edit

Share via


Api.JetAttachDatabase2 method

Attaches a database file for use with a database instance. In order to use the database, it will need to be subsequently opened with JetOpenDatabase(JET_SESID, String, String, JET_DBID, OpenDatabaseGrbit).

Namespace:  Microsoft.Isam.Esent.Interop
Assembly:  Microsoft.Isam.Esent.Interop (in Microsoft.Isam.Esent.Interop.dll)

Syntax

'Declaration
Public Shared Function JetAttachDatabase2 ( _
    sesid As JET_SESID, _
    database As String, _
    maxPages As Integer, _
    grbit As AttachDatabaseGrbit _
) As JET_wrn
'Usage
Dim sesid As JET_SESID
Dim database As String
Dim maxPages As Integer
Dim grbit As AttachDatabaseGrbit
Dim returnValue As JET_wrn

returnValue = Api.JetAttachDatabase2(sesid, _
    database, maxPages, grbit)
public static JET_wrn JetAttachDatabase2(
    JET_SESID sesid,
    string database,
    int maxPages,
    AttachDatabaseGrbit grbit
)

Parameters

  • maxPages
    Type: System.Int32

    The maximum size, in database pages, of the database. Passing 0 means there is no enforced maximum.

Return value

Type: Microsoft.Isam.Esent.Interop.JET_wrn
An ESENT warning code.

See also

Reference

Api class

Api members

Microsoft.Isam.Esent.Interop namespace