Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VB.Net if bug???
Message
 
To
23/02/2005 14:46:15
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
00989793
Message ID:
00989795
Views:
17
>Ok,
>
>I ran into this once, and I thought I was nuts, or something so I dismissed it. Now, I have seen it again.
>
>Here is what is happening. I have a DataRow from a Typed Dataset. For each field it gives you the IsFieldNameNull function. So, in VB .Net I would code something like:
>
>if drJournal.IsAutoRevDateNull Then
> ' Insert a new Journal Entry
>else
> ' Update an existing Journal Entry
>end if
>
>So... even though IsAutoRevDateNull is true the above runs the else code. Now, I found three mods that work:
>
>if drJournal.IsAutoRevDateNull Then
> ' Insert a new Journal Entry
>else
> ' Update an existing Journal Entry
>end if
>
>or
>
>if (drJournal.IsAutoRevDateNull) Then
> ' Insert a new Journal Entry
>else
> ' Update an existing Journal Entry
>end if
>
>or
>
>if drJournal.IsAutoRevDateNull() Then
> ' Insert a new Journal Entry
>else
> ' Update an existing Journal Entry
>end if
>
>
>***********
>
>So, it seems that I need something to force the function to eval. However, it seems to me if VB is not going to require the perens on a function that it should still be evaled to get the boolean value.
>
>Any comments. Is this a bug, or just a VB thing that bothers me cause VFP and C# work fine. Of course, C# requires the perens.
>
>BOb

BOb;

The reason I gave up VB.NET and have stuck with C# is that VB.NET let me do some things that "sometimes worked" and also let me do things I should not have been allowed to do! :)

Tom
Previous
Reply
Map
View

Click here to load this message in the networking platform