>>>Because Decimal will implicity widen to Double. You won't lose information but might lose precision. If I worked with VB.NET the first thing I'd do would be to set OPTION STRICT ON. It still allows all the implicit widening conversions but will catch a lot more potential problems at compile time
>>
>>When doing that, I obtain over 102 errors. Those are all with loRow() lines such as:
>>
>>
>> ' Scan all records
>> For lnCounter = 0 To loDataProvider.nCount - 1
>> loRow = loDataProvider.oRows(lnCounter)
>>
>> ' If we have a shop
>> If loRow("NoMember") > 0 Then
>>
>>
>>This is valid code. Why is the compiler complaining now with strict on?
>
>(haven't been following thread - just looking at this code)
>Not sure why the compiler would care, but could loDataProvider.nCount ever be 0 ? or loDataProvider ever be null?
>
>
>For lnCounter = 0 to - 1 ( I think a step 1 is implied )
The designer cannot know if at run time loDataProvider.nCount would be zero. There is something else causing this.
loDataProvider and loRow are probably declared as:
Dim loDataProvider As Framework.Framework.Data = New Framework.Framework.Data(oApp)
Dim loRow As DataRow = Nothing