RowFilter Syntax on a DataView Using Stored SQL Function

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • HardingR2000
    New Member
    • Sep 2013
    • 1

    RowFilter Syntax on a DataView Using Stored SQL Function

    I am trying to apply a RowFilter to a DataView as follows:

    Code:
    Dim dataViews1 As DataView = New DataView(pdataTable, str, "", DataViewRowState.CurrentRows)
    where str is:

    Code:
    AGENT = '00463' AND  'Protest' = (Select RtnVal = Support.dbo.fn_OAS_ProtestWithdrawFilter ('Protest', '13013', '13013', HRG_STATUS, Protest_Date, w.WD_Status, F_Sched_Date, Can_Protest, HCAD_Can_Protest, PT_Protest_Status))
    I am getting a syntax error which states:

    Missing operand after 'RtnVal' operator

    As you can see, in order to properly filter the data I need to pass some of the row columns through the SQL stored function "Support.dbo.fn _OAS_ProtestWit hdrawFilter". This function performs a test on the values passed to it and returns a value ('Protest') if the row data is protestable. Can I execute this function using the DataView functionality? If not, are there any alternatives?
    Last edited by Rabbit; Sep 13 '13, 03:15 PM. Reason: Please use code tags when posting code or formatted data
Working...