Support for DSN-style Connection Properties

sybase_connect() and sybase_pconnect() APIs support DSN-style connection properties.

When you call either sybase_connect() or sybase_pconnect() APIs using only the servername parameter, servername must contain a valid DSN (data source name) string. The data source name is a semicolon (;) separated string of name=value parts as explained as follows:

  1. Name – a case-insensitive value that can be delimited by an equal sign (=) or semicolon (;). An attribute can have multiple synonyms. For example, server and servername refer to the same attribute.
  2. Equals sign (=) – indicates the start of the value to be assigned to the Name. If there is no equals sign, the Name is assumed to be of boolean type with a value of true.
  3. Value – a string that is terminated by a semicolon (;). Use a backslash (\) if a semicolon or another back slash is present in the value. Values can be of type boolean, integer, or string. Valid values for Boolean types are true, false, on, off, 1, and 0.
    Note: If a boolean name is present without a value, the Boolean type must be set to true.
For example:
Username=name;Password=pwd;Timeout=10