Mismatch between dataview rowfilter and oracle where clause results

S

Sriram

Hi All,

I am using "dataView.RowFilter" method to filter the
values in my .NET 1.0 C# web application.

There is a Oracle 8i Database with a table "Operation" in
which we have a field OperationCode( varchar2) with the
following values :
a1, a2, a3, 20, 21, 23, JEN

I am using DataView.RowFilter method 'CaseSensitivity'
property of underlying datatable is set to true.

1) Setting dataviews's rowfilter Criteria as
OPERATIONCODE < 'a101' returns 4 records a1, 20,21, 23 in
the application.

2) TOAD/Oracle sqlplus Returns 5 records a1, 20, 21, 23,
JEN
sqlplus returns the same a1, 20, 21, 23, JEN

SO Oracle consider A-Z to be less than a-z whereas .net
dataview rowfilter doesnt seem to do so

So the filtering values are different from the values
which we get by querying the database. Is there a way to
get the same values from my dataviews row filter.

We have tried the same thing in framework 1.1 also and
with all types of providers for oracle like OLEDB ODBC and
Microsoft and Oracle Data Providers but all give the same
results.

Any thoughts on this....

Thanks in advance.

Regards,
Sriram
 
K

Kalpesh Shah

Hello Sriram

First, check whether your DataTable brings in the missing row
(which TOAD/SQL-Plus is already showing, but missing in your case)

If this is ok, check out DataTable.Locale.LCID property (coz that is used
to perform sort/search/filter), that might be differing

If you happen to solve it (either ways), do post it

:)
Kalpesh
 
S

Sriram

Hi Kalpesh,
Thanks for replying but my findings are as below:

a) The datatable fetches the missing row. So the problem
is no there.

b)I checked Datatable.Locale.LCID and also tried to set it
to culture neutral. IT shows LCID is 127 now but still the
missing row is not fetched.
This is due to mismatch between Oracle's string comparison
mechanism in select query and the string comparison used
by row filter property of Dataview.

I am still looking for the solution.

Regards,
Sriram
 
M

Miha Markic

Hi Sriram,

I think that CurrentCulture affects the filtering and sorting.
Try changing or adjusting Thread.CurrentThread.CurrentCulture.
 

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