How access sorts non-alphanumeric data

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,

I am getting different results for the string data comparison provided by
Order By clause of Jet provider and the comparison provided by CRT
wcscmp/wcsicmp APIs.

For example,
I have two rows in nvarchar column with data as below.
Row1 : AB
Row2 : {AB
If we sort this column in ascending order, data is displayed in following
sequence,
{AB
AB

{AB comes before AB in the sort order.
In my application, I have to do data comparison with each other.
For string data type wcscmp/wcsicmp CRT APIs are used.
With these APIs for above data AB is less than data {AB
This result is different than what is provided by Order by clause of Jet SQL
statement.
Is this meaning that data comparisons provided by Jet and CRT APIs are
different?
Can someone please help me in understanding this?

Thanks,
Sandeep
 
Sandeep said:
Hi all,

I am getting different results for the string data comparison
provided by Order By clause of Jet provider and the comparison
provided by CRT wcscmp/wcsicmp APIs.

For example,
I have two rows in nvarchar column with data as below.
Row1 : AB
Row2 : {AB
If we sort this column in ascending order, data is displayed in
following sequence,
{AB
AB

{AB comes before AB in the sort order.
In my application, I have to do data comparison with each other.
For string data type wcscmp/wcsicmp CRT APIs are used.
With these APIs for above data AB is less than data {AB
This result is different than what is provided by Order by clause of
Jet SQL statement.
Is this meaning that data comparisons provided by Jet and CRT APIs are
different?
Can someone please help me in understanding this?

Thanks,
Sandeep

For Access sort order check out the help file for "About Arabic sort
order"
 
Thanks Joseph
This is helpful.

Is there any way to match Jet's sort comparison with the CRT APIs comparison

~Sandeep
 
Sandeep said:
Thanks Joseph
This is helpful.

Is there any way to match Jet's sort comparison with the CRT APIs
comparison

Other than writing your own, I don't know.
 
Back
Top