General information
Category:
Coding, syntax and commands
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
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only