Checking for empty string from database field
Posted: Tue Feb 01, 2011 12:52 pm
In my database a field has an empty string, that content can be accessed via {Supplier_Info.address2}
When there is data, I can check the length like this: {Supplier_Info.address2.Length}, however, when it is an empty string, this does not work. Is there another way to check for empty string?
Im using this in an if statement:
{IIF(Supplier_Info.address2.Length > 0, "", "")}
More text here
If it is blank, it does not continue to print the next line.
The only way I have been able to check for an empty string is like this:
{IIF(Supplier_Info.address2 + " " == " ", "", "")}
More text here
Thanks
When there is data, I can check the length like this: {Supplier_Info.address2.Length}, however, when it is an empty string, this does not work. Is there another way to check for empty string?
Im using this in an if statement:
{IIF(Supplier_Info.address2.Length > 0, "", "")}
More text here
If it is blank, it does not continue to print the next line.
The only way I have been able to check for an empty string is like this:
{IIF(Supplier_Info.address2 + " " == " ", "", "")}
More text here
Thanks