Skip to main content

Hi,


We have a SmObject attached to a DB table in SQL. Table has a Status (BIT datatype) column. This is by default created as Yes/No datatype in SmObject.


The problem with this is when we try to "get list" of all ACTIVE status rows, there is an error saying "String is not redognised as a valid Boolean".


i.e, we are passing "YES" to the SmObject property in "GetList" method.


How to avoid this type case error? Appreciate early help.


Thanks


ME

What happens when you set it as 1 or 0


Type cast error.


Integer can not be converted into Boolean.


 


Have you tried to use "True" or "False"?


ya, tried but then the error was "String can not be converted into Boolean".


Currently we resolved it by changing the smartobject prperty (only) to "Text" and then passing "True/False".


But thats only a work around. Any better approach?


-ME


I had the same problem with a SmartObject associated with a Sharepoint list after we upgraded to 4.5.  I also had to change the smartobject from yes/no to text.  Then it worked.  The column in Sahrepoint was a yes/no field which worked in the past.


Reply