Thursday, August 13, 2009

Silverlight Design Time Error

Siverlight User Control Design Time Detection.


if (!System.ComponentModel.DesignerProperties.GetIsInDesignMode(this))




Internal Error 2235 with MSI installation

I am trying to build a simple MSI installation from Wise Installation Editor.

Build OK, test on one PC is fine, however, when I test it on another machine, I get the following error:


Internal Error 2235. ,RuntimeFlags, Select 'Component','RuntimeFlags','KetPath','Attributes'FROM 'Component'WHERE 'Component' =?



    There is no component item at MSI component table.



Add a dummy component node under component table. And build it again.



SQL Bulk copy, is much better then execute insert scripts

Copy whole table:

1. Generate insert script by loop the table rows, execute it

Simple, anyone can do it

2. SqlDataAdapter.Update(table)

Dim builder As New SqlCommandBuilder(adapter)
adapter.InsertCommand = builder.GetInsertCommand(False)

For Each tmpRow As DataRow In dtResult.Rows
adapter.Update(dtResult) 'Insert data here

3. SqlBulkCopy

Dim bCopy As New SqlBulkCopy(ConnExpress)
bCopy.DestinationTableName = tbName

4. SMO (Microsoft.SqlServer.Management.Smo) (Microsoft.SqlServer.Management.Common)

ScrollBar issue with FlexGrid in Compact Framework

The scrollbar of C1FlexGrid displayed very small in VGA mode.


Problem: Scrollbar not resize will in VGA mode


1. Set form draw mode to "DPI"

2. At form.load event, set grid.Size = me.Size.