I just deployed the NOTS project. the NOTS project's old database table is a un-formalized flat table.

I extract it into 4 tables schema in new sqlserver 2005 database.

The problem some other application still use the old table, and create report base on that.

So every updating in new database must synchronized to old table.

Regular dts and simpler SSIS is not usable.

I build a system do completed the job:

1.    A trigger in the new db table to catch “insert,update,delete” and insert to updateLog table.

2.    Create s SSIS pagckage to do the synchronize task.

3.    Schedule a job in Sqlserver 2005 to run every 5 mins.

Here is the script:

1.  The trigger, updateTrigger.sql (1.16 KB)

Notice the “SET NOCOUNT ON” is very important, otherwise it will cause nHibernate update error message:

SQL insert, update or delete failed (expected affected row count: 1, actual affected row count: 2). Possible causes: the row was modified or deleted by another user, or a trigger is reporting misleading row count.

2.    The script in SSIS package

P_ Package_SynNOTS.dtsConfig (.86 KB)

Package_SynNOTS.dtsx (27.6 KB)

 ScriptMain.vb (27.03 KB)

3.    The deployment doc: NotsDB deployment Guide.doc (276 KB)





Categories: SQL Server 2005

<rad:RadGrid Skin="WebBlue" ID="RadGrid1" runat="server"
            GridLines="None" AllowPaging="True" AllowSorting="True" Width="97%" AutoGenerateColumns="False"
            EnableAJAX="true" ShowStatusBar="true" OnPreRender="RadGrid1_PreRender" OnNeedDataSource="RadGrid1_NeedDataSource" OnUpdateCommand="RadGrid1_UpdateCommand" OnInsertCommand="RadGrid1_InsertCommand" OnDeleteCommand="RadGrid1_DeleteCommand">
            <MasterTableView GridLines="None" Width="100%" CommandItemDisplay="Top" DataKeyNames="EmployeeID">
                    <rad:GridEditCommandColumn UniqueName="EditCommandColumn">
                    <rad:GridBoundColumn UniqueName="TitleOfCourtesy" HeaderText="TOC" DataField="TitleOfCourtesy">
                        <HeaderStyle Width="60px"></HeaderStyle>
                          <rad:GridButtonColumn UniqueName="DeleteColumn" Text="Delete" CommandName="Delete" />
                <EditFormSettings UserControlName="EmployeeDetailsCS.ascx" EditFormType="WebUserControl">
                    <EditColumn UniqueName="EditCommandColumn1">


in Usercontrol:

<asp:TextBox id=TextBox2 Text='<%# DataBinder.Eval( Container, "DataItem.FirstName") %>' runat="server" tabIndex=8>

Initial the dropdown in code behind:

  #region Web Form Designer generated code
  override protected void OnInit(EventArgs e)
   // CODEGEN: This call is required by the ASP.NET Web Form Designer.
  /// <summary>
  ///  Required method for Designer support - do not modify
  ///  the contents of this method with the code editor.
  /// </summary>
  private void InitializeComponent()
   this.DataBinding += new System.EventHandler(this.EmployeeDetails_DataBinding);


protected void EmployeeDetails_DataBinding(object sender, System.EventArgs e)
            ArrayList tocs = new ArrayList(new string[] { "Dr.", "Mr.", "Mrs.", "Ms." });

            ddlTOC.DataSource = tocs;

            object tocValue = DataBinder.Eval(DataItem, "TitleOfCourtesy");

            if (tocValue == DBNull.Value)
                tocValue = "Mrs.";
            ddlTOC.SelectedIndex = tocs.IndexOf((string)tocValue);
            ddlTOC.DataSource = null;

DataBinder in System.Web.UI 



Categories: Telerik Controls