; if (objProcedure.SystemObject == false)
{
objProcedure.Script(intOptions,strFilePath,int2Options);
}
}
foreach (SQLDMO.View objView in db.Views)
{
if (objView.SystemObject == false)
{
objView.Script(intOptions,strFilePath,int2Options);
}
}
MessageBox.Show ("成功啦,恭喜,恭喜");
}
catch(Exception e)
{
MessageBox.Show(e.Message);
throw (e);
}
}
}
}
------------------------------------------------------------
测试程序Form1.cs
------------------------------------------------------------
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
namespace GenerateSQLScript
{
/// <summary>
/// Form1 的摘要说明。
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.Button button1;
/// <summary>
&nbs