The package includes product updates in the form of an integrated Sql server 2005 native client odbc Pack 1. New Drivers HP LASERJET 4000 SERIES PRINTER DRIVERS FOR MAC DOWNLOAD The package includes a step-by-step tutorial, a compiled HTML help file. I've tried a whole bunch of different drivers (FreeTDS, SQL SERVER, SQL Server Native Client etc.) but I keep getting this error: SQL error: unixODBCDriver ManagerData source name not found, and no default driver specified, SQL state IM002 FYI, I've installed php5-mssql, freetds and unixODBC. Thanks in advance for your help.
![]()
.Microsoft ODBC Driver 13.1 for SQL Server is a single dynamic-link library (DLL) containing run-time support for applications using native-code APIs to connect to Microsoft SQL Server 2008, SQL Server 2008 R2, SQL Server 2012, SQL Server 2014, SQL Server 2016, Analytics Platform System, Azure SQL Database and Azure SQL Data Warehouse. Microsoft ODBC Driver 13 for SQL Server should be used to create new applications or enhance existing applications that need to take advantage of new SQL Server 2016 features. This redistributable installer for Microsoft ODBC Driver 13 for SQL Server installs the client components needed during run time to take advantage of new SQL Server 2016 feautres, and optionally installs the header files needed to develop an application that uses the ODBC API.
-->
The programming features of the Microsoft ODBC Driver for SQL Server on macOS and Linux are based on ODBC in SQL Server Native Client (SQL Server Native Client (ODBC)). SQL Server Native Client is based on ODBC in Windows Data Access Components (ODBC Programmer's Reference).
An ODBC application can use Multiple Active Result Sets (MARS) and other SQL Server specific features by including
/usr/local/include/msodbcsql.h after including the unixODBC headers (sql.h , sqlext.h , sqltypes.h , and sqlucode.h ). Then use the same symbolic names for SQL Server-specific items that you would use in your Windows ODBC applications.
Available Features
The following sections from the SQL Server Native Client documentation for ODBC (SQL Server Native Client (ODBC)) are valid when using the ODBC driver on macOS and Linux:
Unsupported Features
The following features have not been verified to work correctly in this release of the ODBC driver on macOS and Linux:
The following features are not available in this release of the ODBC driver on macOS and Linux:
Character Set Support
For ODBC Driver 13 and 13.1, SQLCHAR data must be UTF-8. No other encodings are supported.
For ODBC Driver 17, SQLCHAR data in one of the following character sets/encodings is supported:
Note
Due to
iconv differences in musl and glibc many of these locales are not supported on Alpine Linux.
For more information, see Functional differences from glibc
Upon connection, the driver detects the current locale of the process it is loaded in. If it uses one of the encodings above, the driver uses that encoding for SQLCHAR (narrow-character) data; otherwise, it defaults to UTF-8. Since all processes start in the 'C' locale by default (and thus cause the driver to default to UTF-8), if an application needs to use one of the encodings above, it should use the setlocale function to set the locale appropriately before connecting; either by specifying the desired locale explicitly, or using an empty string for example
setlocale(LC_ALL, ') to use the locale settings of the environment.
Thus, in a typical Linux or Mac environment where the encoding is UTF-8, users of ODBC Driver 17 upgrading from 13 or 13.1 will not observe any differences. However, applications that use a non-UTF-8 encoding in the above list via
setlocale() need to use that encoding for data to/from the driver instead of UTF-8.
SQLWCHAR data must be UTF-16LE (Little Endian).
![]()
When binding input parameters with SQLBindParameter, if a narrow character SQL type such as SQL_VARCHAR is specified, the driver converts the supplied data from the client encoding to the default (typically codepage 1252) SQL Server encoding. For output parameters, the driver converts from the encoding specified in the collation information associated with the data to the client encoding. However, data loss is possible --- characters in the source encoding not representable in the target encoding will convert to a question mark ('?').
To avoid this data loss when binding input parameters, specify a Unicode SQL character type such as SQL_NVARCHAR. In this case, the driver converts from the client encoding to UTF-16, which can represent all Unicode characters. Furthermore, the target column or parameter on the server must also be either a Unicode type (nchar, nvarchar, ntext) or one with a collation/encoding, which can represent all the characters of the original source data. For avoiding data loss with output parameters, specify a Unicode SQL type, and either a Unicode C type (SQL_C_WCHAR), causing the driver to return data as UTF-16; or a narrow C type, and ensure that the client encoding can represent all the characters of the source data (this is always possible with UTF-8.)
For more information about collations and encodings, see Collation and Unicode Support.
There are some encoding conversion differences between Windows and several versions of the iconv library on Linux and macOS. Text data in codepage 1255 (Hebrew) has one code point (0xCA) that behaves differently upon conversion to Unicode. On Windows, this character converts to the UTF-16 code point of 0x05BA. On macOS and Linux with libiconv versions earlier than 1.15, it converts to 0x00CA. On Linux with iconv libraries that do not support the 2003 revision of Big5/CP950 (named
BIG5-2003 ), characters added with that revision will not convert correctly. In codepage 932 (Japanese, Shift-JIS), the result of decoding of characters not originally defined in the encoding standard also differs. For example, the byte 0x80 converts to U+0080 on Windows but may become U+30FB on Linux and macOS, depending on iconv version.
In ODBC Driver 13 and 13.1, when UTF-8 multibyte characters or UTF-16 surrogates are split across SQLPutData buffers, it results in data corruption. Use buffers for streaming SQLPutData that do not end in partial character encodings. This limitation has been removed with ODBC Driver 17.
OpenSSL
Starting with version 17.4, the driver loads OpenSSL dynamically, which allows it to run on systems that have either version 1.0 or 1.1 without a need for separate driver files. When multiple versions of OpenSSL are present, the driver will attempt to load the latest one. The driver currently supports OpenSSL 1.0.x and 1.1.x
Note
A potential conflict may occur if the application that uses the driver (or one of its components) is linked with or dynamically loads a different version of OpenSSL. If several versions of OpenSSL are present on the system and the application uses it, it is highly recommended that one be extra careful in making sure that the version loaded by the application and the driver do not mismatch, as the errors could corrupt memory and thus will not necessarily manifest in obvious or consistent ways.
Alpine Linux
At the time of this writing the default stack size in MUSL is 128K, which is enough for basic ODBC driver functionality, however depending on what the application does it is not difficult to exceed this limit, especially when calling the driver from multiple threads. It is recommended that an ODBC application on Alpine Linux is compiled with
-Wl,-z,stack-size=<VALUE IN BYTES> to increase the stack size. For reference the default stack size on most GLIBC systems is 2MB.
Additional Notes
See Also![]() Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
January 2023
Categories |