LessThanDot Site Logo

LessThanDot

A decade of helpful technical content

This is an archive of the posts published to LessThanDot from 2008 to 2018, over a decade of useful content. While we're no longer adding new content, we still receive a lot of visitors and wanted to make sure the content didn't disappear forever.

What I test in a DomainObject in VB.NET using nunit

What a long title :D. I use nUnit (funny how they use php for their website) for my testing together with Resharper they make a good team. So lets first look at one of my DomainObjects/Entities. Namespace AddressManagement ''' <summary> ''' ''' </summary> ''' <remarks></remarks> <CLSCompliant(True)> _ <NHibernate.Mapping.Attributes.JoinedSubclass(0, Table:="tbl_Country", extendstype:=GetType(Common.Translated), lazy:=False)> _ Public Class Country Inherits Common.Translated Implements Interfaces.ICountry #Region " Private members " ''' <summary> ''' A local variable called _name of type String ''' </summary> ''' <remarks>Has Property Name</remarks> Private _name As String #End Region #Region " Constructors " ''' <summary> ''' Default empty constructor ''' </summary> ''' <remarks></remarks> Public Sub New() Me.

Read More...

Wrong mapping Component in nHibernate using VB.Net

Today I had a little problem with component mapping and the attributes. And It has something to do with the fact that all my objects use interfaces. I had this in my MspResult class. <NHibernate.Mapping.Attributes.ComponentProperty(componenttype:=GetType(Littlexyz))> _ Public Overridable Property Littlexyz() As Interfaces.ILittleXyz Implements IMspResult.Littlexyz Get _Log.LogDebug("Property Littlexyz - returning _Littlexyz") Return _littlexyz End Get Set(ByVal Value As Interfaces.ILittleXyz) _Log.LogDebug("Property Littlexyz - setting _Littlexyz") _littlexyz = Value End Set End Property``` And this in the Littlexyz class.

Read More...

SQL Server 2008 Release Candidate 0 Available For Download

SQL Server 2008 Release Candidate 0 has been made available for download to people who have a MSDN subscription The download is a little over 3GB, to be exact it is 3,118.13 MB SQL Server 2008 Release Candidate 0 (RC0) will automatically expire after 180 days. Each SQL Server 2008 RC0 download includes the following editions: SQL Server 2008 Developer Edition RC0 SQL Server 2008 Enterprise Edition RC0 SQL Server 2008 Standard Edition RC0

Read More...

Domainentity and IsDirty

I never saw the need to add isdirty to a domainentity untill today. After showing the user a list of objects on the screen in a datagridview (which I don’t use very often) I then had to save that list. And there are two ways to go about it. Let nHibernate handle it or pick out the changed objects. Since the nhibernate route was a bit slow. I decided to do it myself and add an IsDirty to the Domain object.

Read More...

OPENROWSET And Excel Problems

Create an excel sheet In the first 2 rows put some data, save the excel sheet as testing.xls on the c drive Execute the command below SELECT * FROM OPENROWSET( 'Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=C:testing.xls','SELECT * FROM [Sheet1$]') You will see 1 row since the first row will be used for header names If you want 2 rows you need to add HDR=No like this SELECT * FROM OPENROWSET( 'Microsoft.Jet.OLEDB.4.0', 'Excel 8.

Read More...

Why does Adobe make it hard to distribute Adobe reader?

Today I wanted to download Adobe Reader 8 so I could install it on our computers. Apparently Adobe doesn’t want you to do this. You have two options, Agree to their distrubition agreement (dutch version, sorry). or download it one by one on each computer which is a waste of bandwidth. Don’t they want firms to use it anymore? What is behind this decision? I don’t know. In the end I did the distribution agreement.

Read More...

Podcast: SQL Server 2008 Security and Availability, Management, Troubleshooting and Throttling

TechNet Radio has 2 podcasts about SQL Server 2008 Part 1: industry experts Kimberly Tripp and Paul S. Randall about what is new in SQL 2008. Part One focuses on Security and Availability Part 2: experts Kimberly Tripp and Paul S. Randal talk about what is new in SQL 2008. Part two focuses on Management, Troubleshooting and Throttling Download part 1 here: http://download.microsoft.com/download/6/e/6/6e668f11-0e4b-40d1-9adb-084d5bb335a4/TechNetRadio03042008-web.wma Download part 2 here: http://download.microsoft.com/download/e/5/4/e5440aa4-8fa1-44ad-acaf-e513d3b89026/TechNetRadio03112008-web.wma Edit ——–

Read More...

Yes, I do make stupid mistakes

Granted this one is due to the intellisense being a bit overactive, but can you spot the mistake? vbnet ''' <summary> ''' Select this record for printing ''' </summary> ''' <value></value> ''' <returns></returns> ''' <remarks></remarks> <NHibernate.Mapping.Attributes.Property()> _ Public Property Printed() As Boolean Implements Interfaces.ICDCover.Printed Get Return _printed End Get Set(ByVal value As Boolean) _printed = False End Set End Property I can :oops:.

Read More...

SQL Server 2008 Logo

Here is the new logo for SQL Server 2008. Looks pretty clean, what do you think? via Aaron Bertrand

Read More...

Use solution folders

In Visual studio 2008 you can use Solution folders to organize you projects. If you have an extra big solutions you don’t feel like splitting up then use the solution folders. The first image shows how to do it. And the second shows an image where you have multiple soulution folders.

Read More...