0

Based on ODBS standard, special characters are allowed in strings provided they are braced in { }. It is IMO difficult to clarify all aspects from the standard(see comments below this answer)

This is a what to do question rather than how to do: Is a key-values like PWD={Iam};password}; considered a valid case? Should the value be expected to parse to Iam};password ?

Once this is answered, one can look at more exotic cases like:

  • PWD={Iam};password} ;

  • PWD={I am }; a password};

  • PWD={I am } ; a password};

rahman
  • 4,820
  • 16
  • 52
  • 86
  • Can you show what you have and add relevant tags so people will find this question? – sehe Mar 19 '23 at 12:17
  • "Is a key-values like PWD={Iam};password}; considered a valid case?" - nobody knows. The linked page says ["Avoid using embedded braces in a keyword value."](https://learn.microsoft.com/en-us/sql/odbc/reference/syntax/sqldriverconnect-function?view=sql-server-ver16#:~:text=Avoid%20using%20embedded%20braces%20in%20a%20keyword%20value) but then it *also* says "A DSN or connection string value enclosed with braces ({}) containing any of the characters []{}(),;?*=!@ is passed intact to the driver" - this implies that somehow the `}` in `};` or at the end of the input is more special... – sehe Mar 19 '23 at 17:22
  • I would make my own safe assumptions here instead **OR** look for more authoritative standard specification (which might be paid). – sehe Mar 19 '23 at 17:22

0 Answers0