24.2.5. ODBC connection string


<< Prev   Next >>

24.2.5.1. General information

To connect to an external data source, generate a connection string that can contain either all connection parameters required for the selected ODBS driver, or an indication to the generated DSN (Data Source Name) data source description.

24.2.5.2. Full connection string

The connection string is described in English at: http://msdn.microsoft.com/en-us/library/ms722656.aspx. The following things should be noted in this description:

  • The connection string parameters are written in Keyword=Value pairs and separated by the ";" character.
  • If there are multiple parameters with the same keyword in the connection string, the last indication of the parameter in the connection string will be used. Thus, if such parameters as Username or Password are specified both in the connection string and in the Connection parameters dialog box, the values from the Connection parameters dialog box will be used because these parameters will be added to the specified connection string from the right side.

To simplify the connection string generation, you can use the website: http://www.connectionstrings.com/.

24.2.5.3. Data source descriptions

Instead of specifying the full connection string, you can use extra utilities that can generate a data source description (DSN) and specify a construct of the DSN=NameDSN type in the connection parameters. Data source description can be user and system ones. User descriptions of data sources are available on this computer and only for the user who generated this description. The system description is generated by the system administrator and available for all users of this computer (if they have appropriate permissions).

24.2.5.4. ODBC data source administration utility

To generate a data source description, use the ODBC data source administration utility. To open this utility in Windows, go to Control Panel ‑ Administration ‑ Data Sources (ODBC). At this, the Windows Control Panel opens the administration utility corresponding to the version of the operating system. In Linux OS this utility is called ODBCConfig and available if the relevant package is installed (depending on the version of Linux OS).

Keep in mind that drivers and data sources are different for 32-bit and 64-bit ODBC in 64-bit Windows. Thus, to generate a data source description, use the administration utility relevant to the version of 1C:Enterprise system that will execute queries to an external data source. So, for example, if ODBC is accessed from the 64-bit version of 1C:Enterprise server, use the 64-bit version of the administration utility. If you use the 32-bit version of 1C:Enterprise on 64-bit Windows, use the 32-bit administration utility.

The administration utilities are located on 64-bit Windows as follows:

  • 64-bit version: %SYSTEMROOT%\System32\odbcad32.exe.
  • 32-bit version: %SYSTEMROOT%\SysWOW64\odbcad32.exe.

<< Prev   Next >>

Icon/Social/001 Icon/Social/006 Icon/Social/005 Icon/Social/004 Icon/Social/002