views:

35

answers:

3

Hi everybody!

In a winforms application i 'm storing one Wingdings char in a SQL Server 2005 field of type NVARCHAR(1).

Storing, retrieving and showing up this char in a control works fine.

The problem i'm facing is this: how to search for records which have a specific wingding char value: for example

Select * from table where FieldWithWingding = valueOfLeftArrowChar

How to achieve this?

Thanks in advance

+4  A: 

Wingdings is a font! Fonts give a special appearance to characters in a given character set. The left-arrow is therefore a character. Look it up in start->all programs->Accessories->System tools->Character map

Your select will be something like:

Select * from table where FieldWithWingding = 'ß'
klausbyskov
Additionally, you could use the CHR() function. Character map will also show you the hex code for the character.
GalacticCowboy
It's actually a typeface. :-P
billynomates
@klausbyskov I know it is a font. The problem is when i get the value (using Visual Basic ComboBoxSearch.SelectedItem().ToString) in the debugger i get a value with a...dot. This is pretty useless while debugging.@GalacticCowboy i cannot see the benefit of using chr() but i will have a closer look at it.
Savvas Sopiadis
A: 

Try this: select Unicode(N'ß'), Nchar(Unicode(N'ß'))

Use @filter nvarchar(1) or nchar(1) data types

igor
+1  A: 

Igor pointed me into the correct direction: it's actually

Select * from table where FieldWithWingding = N'ß'

Works fine!

Thank you everybody!

Savvas Sopiadis
good luck......
igor