5/26/2023 0 Comments Setting up odbc manager on linuxDoes this even make sense? If so, which prevails? ![]() In simple terms, odbcinst.ini is a registry and configuration file for ODBC drivers in an environment, while odbc.ini is a registry and configuration file for ODBC DSNs (Data Source Names), typically based on drivers registered in the other.ġ) I have a line Driver = /path/to/file/.so in both files and the values sometimes differ. These are meant to be API equivalent to each other and to the Windows implementation, as both are platform-agnostic implementations of the standard. UnixODBC is the other, and was discussed in other answers. iODBC, whose documentation relevant to this question is here, is maintained and supported by my employer. There are two ODBC driver managers commonly found on Unix. None of these implementations are 100% comparable to the reference implementation on Windows, produced by the maintainer of the ODBC spec, i.e., Microsoft. If you only look at Unix implementations, you'll get some interesting ideas about how ODBC works. I'm sure there's many other variables that can be set and used but this is the simplest explanation I can give of the files you asked about. $company_name = odbc_result($query_companies, 9) $client_id = odbc_result($query_companies, 6) $query_companies = odbc_exec($conn_id, $sql_companies) $sql_companies = "SELECT * from AMGR_Client_Tbl WHERE Record_Type='1'" ![]() $conn_id = odbc_connect($host, $user ,$password) or die (odbc_errormsg()) Įxample php code to demonstrate how I set up and use the connection. ![]() Holds the configuration for the Driver section in odbc.ini. The configuration defines the server it needs to connect to. php) that connects to the database (see example below). Holds the instance that is referred to within the handler (e.g. The explanation I can give to the config files: I use FreeTDS on Debian to connect a php-driven website to a MS-SQL Server 2005 Database.
0 Comments
Leave a Reply. |