PSI: IOperator shall compare with System.DBNull

T

Termin_Terminator

Hello
this whole filtering stuff of PSI is a really "challange".......

Please how can I filter a column by "System.DBNull" ?
A column of type "System.Guid" can have either System.Guid or
System.DBNull.
I want to get all columns with "System.DBNull" but when creating an
IOperator all I get are errors, example:

PSLib.Filter.IOperator[] fos = new PSLib.Filter.IOperator[1];

fos[0] = new
PSLib.Filter.FieldOperator(PSLib.Filter.FieldOperationType.Equal,
"RES_CHECKOUTBY", new object[]{System.DBNull});

This does not work, what can I do to filter for "System.DBNull"?

Does anybody have a tutorial for dummies which explains how filter
object to work?
I wish back direct SQL access to Project Server databases, really!!

TIA and good bye

Termin_Terminator
 
T

Termin_Terminator

Solved.

fos[0] = new
PSLib.Filter.FieldOperator(PSLib.Filter.FieldOperationType.IsNull,
"RES_CHECKOUTBY");

The comparison "IsNull" also compares against 'System.DBNull', while
inside code a comparison against a DataTable column has to be

column is System.DBNull

Kind regards

Termin_Terminator
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top