public void Setup()
        {
            this.native = new NATIVE_OBJECTINFO()
            {
                cbStruct = (uint)Marshal.SizeOf(typeof(NATIVE_OBJECTINFO)),
                cPage = 2,
                cRecord = 3,
                flags = 0x20000000,     // Template
                grbit = 7,              // Updatable | Bookmark | Rollback
                objtyp = 1,             // Table
            };

            this.managed = new JET_OBJECTINFO();
            this.managed.SetFromNativeObjectinfo(ref this.native);
        }
Example #2
0
 /// <summary>
 /// Retrieves various pieces of information about a table in a database.
 /// </summary>
 /// <remarks>
 /// This overload is used with <see cref="JET_TblInfo.Default"/>.
 /// </remarks>
 /// <param name="sesid">The session to use.</param>
 /// <param name="tableid">The table to retrieve information about.</param>
 /// <param name="result">Retrieved information.</param>
 /// <param name="infoLevel">The type of information to retrieve.</param>       
 public static void JetGetTableInfo(JET_SESID sesid, JET_TABLEID tableid, out JET_OBJECTINFO result, JET_TblInfo infoLevel)
 {
     Api.Check(Impl.JetGetTableInfo(sesid, tableid, out result, infoLevel));
 }
Example #3
0
 /// <summary>
 /// Retrieves information about database objects.
 /// </summary>
 /// <param name="sesid">The session to use.</param>
 /// <param name="dbid">The database to use.</param>
 /// <param name="objtyp">The type of the object.</param>
 /// <param name="szObjectName">The object name about which to retrieve information.</param>
 /// <param name="objectinfo">Filled in with information about the objects in the database.</param>
 public static void JetGetObjectInfo(
     JET_SESID sesid,
     JET_DBID dbid,
     JET_objtyp objtyp,
     string szObjectName,
     out JET_OBJECTINFO objectinfo)
 {
     Api.Check(Impl.JetGetObjectInfo(sesid, dbid, objtyp, szObjectName, out objectinfo));
 }
Example #4
0
 public void JetObjectinfoToString()
 {
     var value = new JET_OBJECTINFO();
     Assert.AreEqual("JET_OBJECTINFO(None)", value.ToString());
 }