WHAT I HAVE:
Visual Basic 2019+, .NET Framework 4.6+, Entity Framework 6+, SQL Server ??.??, WinForms
What if I wish to create a unique index (not necessarily the primary key, but it can be) with 1 or more string fields checked an a case-insensitive, rather than exact-match, basis? For instance, can I make it so that if there's an entry "RobertAG2" and the program tries to insert "ROBERTAG2" or "robertag2"--which differ from the existing entry only in case--an exception is thrown, just as if they were identical? That be useful for, say, email and URL addresses--which are found by browsers on a case-insensitive basis (??), but for which the user might have a casing preference for display purposes. It would be tedious to have an index field with a general (say, all-lowercase) casing and another, non-index one with the preferred case--particularly if there are several fields in several tables with that need,--because that would be a lot of de facto duplication (a database no-no), and it means a bug in the program--or possible alteration by another program--could result in situations where a pair of fields don't differ only in case--causing the program to malfunction. Yet the SQL to create a unique index that's mentioned in help doesn't seem to have a clause for case-sensitivity status for string fields.
Is there a solution? If so, I want it in VB.NET, using minimal changes in the raw SQL syntax for unique-index creating (I prefer the OOP style of EF--complete with Intellisense,--given a choice), and as simple as possible. Please answer ASAP.