Monday, 14 June 2010

I Should Know Better: Another View Column Gotcha

How many times do I make this mistake with @Dblookup or @DBColumn.

I must remember that they do not return anything if I hard code a value that is a constant in a view column.

Today I put the value of "1" in a column so I could do a @DBLookup and count the occurrences using @elements. I wanted to use "1" because it would mean that it would take a long time before the 64k limit would be hit.

"@DbLookup can return no more than 64KB of data"

I spent about 10 minutes debugging it when it did not return anything but did return something for other columns. Then I remembered the above and swapped it for the first character of a field using @Left.

Groan. What a noob!

Does anyone else find themselves making these newbie mistakes?

0 comments: