CUAHSI / HydroServer

BSD 3-Clause "New" or "Revised" License
8 stars 4 forks source link

ODM Tools: Database Connection Form Does Not Allow Special Characters #46

Open xhqiao89 opened 7 years ago

xhqiao89 commented 7 years ago

horsburgh[CodePlex]
ODM Tools version 1.1.1 will not allow me to use any special characters in the quotServer User IDquot input text field on the quotDatabase Configurationquot form. It is not uncommon for SQL Server user names to have underscores or other special characters in them. The limitation on which characters can be entered into that field should be removed.

xhqiao89 commented 7 years ago

sreeder[CodePlex]
Error should be fixed in source code checkin # 59439

xhqiao89 commented 7 years ago

kimschreuders[CodePlex]
Here are the rules for Microsoft’s SQL Server Logins (which are one type of SQL Server identifiers) and found that for all versions of SQL Server that are approved for use with ODM (2005 and newer), the rules are a character length limit of 128 characters and:

The first character must be one of the following: • A letter as defined by the Unicode Standard 2.0. The Unicode definition of letters includes Latin characters from a through z and from A through Z, in addition to letter characters from other languages. • The underscore (_), at sign (@), or number sign (#). Certain symbols at the beginning of an identifier have special meaning in SQL Server. An identifier beginning with the at sign denotes a local variable or parameter. An identifier beginning with a number sign denotes a temporary table or procedure. An identifier beginning with double number signs (##) denotes a global temporary object.

Some Transact-SQL functions have names that start with double at signs (@@). To avoid confusion with these functions, it is recommended that you do not use names that start with @@. Subsequent characters can be: • Letters as defined in the Unicode Standard 2.0. • Decimal numbers from either Basic Latin or other national scripts. • The at sign (@), dollar sign ($), number sign (#), or an underscore (_). The identifier must not be a Transact-SQL reserved word. SQL Server reserves both the uppercase and lowercase versions of reserved words. Embedded spaces or special characters are not allowed.

Since these are the rules from a SQL Server standpoint, ODM Tools should probably allow follow something similar.