Пример #1
0
 private void ExecSQLFile(string Path, DBLite DB)
 {
     string fileContent = File.Read(Path);
     string[] splitter = new string[] { "\r\nGO\r\n" };
     string[] commandTexts = fileContent.Split(splitter,
     StringSplitOptions.RemoveEmptyEntries);
     foreach (string commandText in commandTexts)
     {
         if (DB.Exec(commandText) == false)
             LogAdd("Error: " + DB.ExError.Message);
         DB.Close();
     }
 }
Пример #2
0
 private void ExecSQLString(string String, DBLite DB)
 {
     string[] splitter = new string[] { "\r\nGO\r\n" };
     string[] commandTexts = String.Split(splitter,
     StringSplitOptions.RemoveEmptyEntries);
     foreach (string commandText in commandTexts)
     {
         if (DB.Exec(commandText) == false)
             LogAdd("Error: " + DB.ExError.Message);
         DB.Close();
     }
 }