Connection string registration

There are two methods for registering the connection string:

  • You can register an ODBC data source in the ODBC Data Source Administrator, and reference it by name.

  • You can specify a full SQL Anywhere connection string. For example:

    connectionString="SERVER=MyServer;DBN=MyDatabase;UID=DBA;PWD=sql"

When you add the <connectionStrings> element to the web.config file, the connection string and its provider can be referenced by the application. Updates can be implemented in a single location.

 XML code sample for connection string registration