How access sorts non-alphanumeric data

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
 
J

Joseph Meehan

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"
 
G

Guest

Thanks Joseph
This is helpful.

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

~Sandeep
 
J

Joseph Meehan

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.
 

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