SQL Server – Formatting Numbers as Strings with Leading Zero’s

Sometimes it’s necessary to format numbers as Strings with leading zero’s. One such example is when we sort a list in Excel, Excel will sort the numbers as 0,1,10,2,20,3,30,….. So, to get round this, we simply append a leading 0 to the number. This is achieved in T-SQL by using the RIGHT instruction with following [...]

By |2011-03-03T12:46:00+00:00March 3rd, 2011|Data, Excel, SQL Server, VB.net|0 Comments

.EndEdit causes row movement of a sorted BindingSource

When applying a sort to a Database BindingSource, executing the BindingSource.EndEdit method causes the currently selected row to change. This has the effect of reloading any bound controls when tee edited row is saved, which of course can have unwanted effects if you need to operating on data related to the currently selected row after [...]

By |2017-07-24T08:33:20+01:00January 16th, 2011|Bugs, Data, VB.net|0 Comments