/// <summary> /// Creates and attaches a database file. /// </summary> /// <param name="sesid">The session to use.</param> /// <param name="database">The path to the database file to create.</param> /// <param name="dbid">Returns the dbid of the new database.</param> /// <param name="grbit">Database creation options.</param> public static void CreateDatabase(JET_SESID sesid, string database, out JET_DBID dbid, CreateDatabaseGrbit grbit) { Api.JetCreateDatabase(sesid, database, null, out dbid, grbit); }
/// <summary> /// Initializes a new instance of the <see cref="TableNameEnumerator"/> class. /// </summary> /// <param name="sesid"> /// The session to use. /// </param> /// <param name="dbid"> /// The database to get the table names from. /// </param> public TableNameEnumerator(JET_SESID sesid, JET_DBID dbid) : base(sesid) { this.dbid = dbid; }
/// <summary> /// Returns the names of the tables in the database. /// </summary> /// <param name="sesid">The session to use.</param> /// <param name="dbid">The database containing the table.</param> /// <returns>An iterator over the names of the tables in the database.</returns> public static IEnumerable <string> GetTableNames(JET_SESID sesid, JET_DBID dbid) { return(new GenericEnumerable <string>(() => new TableNameEnumerator(sesid, dbid))); }