MakeKey() public static méthode

Constructs a search key that may then be used by JetSeek and JetSetIndexRange.
public static MakeKey ( JET_SESID sesid, JET_TABLEID tableid, DateTime data, MakeKeyGrbit grbit ) : void
sesid JET_SESID The session to use.
tableid JET_TABLEID The cursor to create the key on.
data DateTime Column data for the current key column of the current index.
grbit MakeKeyGrbit Key options.
Résultat void
Exemple #1
0
 /// <summary>
 /// Constructs a search key that may then be used by <see cref="JetSeek"/>
 /// and <see cref="JetSetIndexRange"/>.
 /// </summary>
 /// <param name="sesid">The session to use.</param>
 /// <param name="tableid">The cursor to create the key on.</param>
 /// <param name="data">Column data for the current key column of the current index.</param>
 /// <param name="grbit">Key options.</param>
 public static void MakeKey(JET_SESID sesid, JET_TABLEID tableid, DateTime data, MakeKeyGrbit grbit)
 {
     Api.MakeKey(sesid, tableid, data.ToOADate(), grbit);
 }
Exemple #2
0
        /// <summary>
        /// Constructs a search key that may then be used by <see cref="JetSeek"/>
        /// and <see cref="JetSetIndexRange"/>.
        /// </summary>
        /// <param name="sesid">The session to use.</param>
        /// <param name="tableid">The cursor to create the key on.</param>
        /// <param name="data">Column data for the current key column of the current index.</param>
        /// <param name="grbit">Key options.</param>
        public static void MakeKey(JET_SESID sesid, JET_TABLEID tableid, bool data, MakeKeyGrbit grbit)
        {
            byte b = data ? (byte)0xff : (byte)0x0;

            Api.MakeKey(sesid, tableid, b, grbit);
        }