469,343 Members | 5,693 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,343 developers. It's quick & easy.

maintaining case while inserting GUIDs into SQL Server tables

Hi All,

I am trying to insert a GUID generated in .NET into my SQL Server tables. I
am inserting it into a column of type uniqueidentifier. The GUID generated by
..NET has lower case alphabets in it but after i insert it into the SQL Server
tables, all the lower case alphabets get converted into upper case alphabets.
This causes problems when i retreive it and compare to the one stored locally
in my program. Isn't the GUID case sensitive? Has anybody encountered this
problem before? Any ideas or suggestions on how to resolve this issue will be
greatly appreciated.

Thank You,
Vish
Apr 13 '06 #1
1 3794
Vish wrote:
Hi All,

I am trying to insert a GUID generated in .NET into my SQL Server
tables. I am inserting it into a column of type uniqueidentifier. The
GUID generated by .NET has lower case alphabets in it but after i
insert it into the SQL Server tables, all the lower case alphabets
get converted into upper case alphabets. This causes problems when i
retreive it and compare to the one stored locally in my program.
Isn't the GUID case sensitive? Has anybody encountered this problem
before? Any ideas or suggestions on how to resolve this issue will be
greatly appreciated.

Thank You,
Vish


A GUID is a 16 byte binary value. The form you see is merely a string
representation of the GUIDs value. If you want to compare the STRINGS, I'd
suggest that you do a case-insensitive compare.

--
Gordon Smith (eMVP)
-- Avnet Applied Computing Solutions
Apr 13 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by J.Marsch | last post: by
2 posts views Thread by Howard Kaikow | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.