易截截图软件、单文件、免安装、纯绿色、仅160KB

C#使用SQLDMO实现对MSSQL数据库进行备份和恢复

public sealed class DbOper
{
     ///<summary>
     /// DbOper类的构造函数
     ///</summary>
     private DbOper()
     {
     }
     ///<summary>
     /// 数据库备份
     ///</summary>
     public static void DbBackup()
     {
          SQLDMO.Backup oBackup = new SQLDMO.BackupClass();
          SQLDMO.SQLServer oSQLServer = new SQLDMO.SQLServerClass();
         try
         {
              oSQLServer.LoginSecure = false;
              oSQLServer.Connect("localhost", "sa", "1234");
              oBackup.Action = SQLDMO.SQLDMO_BACKUP_TYPE.SQLDMOBackup_Database;
              oBackup.Database = "Northwind";
              oBackup.Files = @"d:\Northwind.bak";
              oBackup.BackupSetName = "Northwind";
              oBackup.BackupSetDescription = "数据库备份";
              oBackup.Initialize = true;
              oBackup.SQLBackup(oSQLServer);
         }
      &nbs


相关文档:

C#中使用DataTable显示Access数据库中文件列表


private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
             this.comboBox2.Items.Clear();
            switch(this.comboBox1.SelectedIndex)
       ......

C# Active控件,并触发javascript事件

创建一个Winform用户控件 UserControl1
 using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using System.Reflection;
namespace MyActiveT ......

C# 通过xsl转换大xml文件方法

通过xsl转换大xml文件
这几天在做这个,网上的几个方法我都试过了,汇总如下
方法一:
XPathDocument myXPathDoc = new XPathDocument(tbXMLFile.Text);
 
XslCompiledTransform myXslTrans = new XslCompiledTransform();
myXslTrans.Load(tbXSLFile.Text);
 
XmlTextWriter myWriter = new XmlTextWrit ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号