コード例 #1
0
        private void ScriptDatabase(Database db, string dest)
        {
            try{
                System.IO.Directory.CreateDirectory(dest);

                s_transfer.DropDestinationObjectsFirst = true;
                s_transfer.CopySchema     = true;
                s_transfer.CopyAllObjects = false;                 // first stop all objects
                ReadandWriteObjectsFromDatabasetoFile(db, dest);
                dname.Text = "Scripting Complete"; oname.Text = "";
            }catch (Exception ex) {
                m_vssDatabase.Close();
                m_vssDatabase  = null;
                dname.Text     = "Error: " + ex.Message;
                errorsOccurred = true;
                Logger.Log("Error: " + ex.Message);
                Logger.Log("Stack: " + ex.StackTrace);
            }
        }
コード例 #2
0
 public void Close()
 {
     vssDatabase.Close();
 }