Rowfilter problem

G

Guest

Hello all,

Here is my situation

I am trying to create a dataview with the following rowfilter

PMA_DatakeyId IN
('f7635461-da12-48f2-b01f-83e5a720d6ec','9be31cee-dcbe-4ee9-9583-4f8772d83cb8') AND PMAModeId = 0

This statement works fine in MSSQL as the where clause like this:

select * from pma_datakeys

where PMA_DatakeyId IN
('f7635461-da12-48f2-b01f-83e5a720d6ec','9be31cee-dcbe-4ee9-9583-4f8772d83cb8') AND PMAModeId = 0

but when i try to apply it as a rowfilter as follows (Linklist contains the
part of the where clause starting at PMA):

Dim dv As DataView
dv = New DataView(ds.Tables("TotalDataKeys"), linklist.ToString, "",
DataViewRowState.CurrentRows)

It gives me this error:

Cannot perform '=' operation on System.Guid and System.String.

What am I doing wrong?

Corey
 
M

Marina

Not sure if the rowfilter supports the IN operator, you should check the
documentation. You may need to split it up into separate comparisons and OR
them together.
 

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