Example #1
0
        // NOTE:  More public methods are located in F1Sql.ExportMethods.cs.

        /// <summary>
        /// Opens the specified SQL Database (MDF) file and reads and validates the schema without reading the data.
        /// </summary>
        /// <param name="fileName">Name of the file</param>
        public static void OpenConnection(string fileName)
        {
            FileName = fileName;

            try
            {
                _db = new F1SqlDatabase(fileName);
                F1Sql.IsConnected = true;
            }
            catch (Exception ex)
            {
                ErrorMessage      = ex.Message;
                F1Sql.IsConnected = false;
            }
        }
Example #2
0
 /// <summary>
 /// Opens the SQL Database (MDF) file and reads the data into memory.
 /// </summary>
 public void OpenDatabase()
 {
     _db = new F1SqlDatabase(FileName, true);
 }