From b09b2b68185dccf1e5d7d247f61c94e9fb580cf3 Mon Sep 17 00:00:00 2001 From: "Thomas G. Lockhart" Date: Tue, 1 Sep 1998 15:48:00 +0000 Subject: [PATCH] Initial information for Linux/Unix installation. --- doc/src/sgml/odbc.sgml | 174 ++++++++++++++++++++++++++++++++++------- 1 file changed, 147 insertions(+), 27 deletions(-) diff --git a/doc/src/sgml/odbc.sgml b/doc/src/sgml/odbc.sgml index c9e2d5821c..358897dcc2 100644 --- a/doc/src/sgml/odbc.sgml +++ b/doc/src/sgml/odbc.sgml @@ -5,77 +5,101 @@ Tim Goeke + +Thomas +Lockhart + -Transcribed 1998-02-12 +1998-08-25 -ODBC Interface +<acronym>ODBC</acronym> Interface -Contributed by Tim Goeke +Background information originally by + Tim Goeke -ODBC is an abstract API which allows you to write standard "ODBC" code, -using the ODBC API. +ODBC (Open Database Connectivity) is an abstract +API +which allows you to write standard "ODBC" applications. +ODBC provides a product-neutral interface +between frontend applications and database servers, +allowing a user or developer to write applications which are portable among servers. Background -The ODBC API matches up on the backend to an ODBC compatible data source. -This could be anything from a text file to an Oracle RDBMS. +The ODBC API matches up +on the backend to an ODBC-compatible data source. +This could be anything from a text file to an Oracle or +Postgres RDBMS. -The backend access come from ODBC drivers, or vendor specifc drivers that -allow data access. PostODBC is such a driver, along with others that are -available, such as the OpenLink ODBC drivers. +The backend access come from ODBC drivers, or vendor specifc drivers that +allow data access. psqlODBC is such a driver, along with others that are +available, such as the OpenLink ODBC drivers. -Once you write an ODBC application, you SHOULD be able to connect to ANY +Once you write an ODBC application, you SHOULD be able to connect to ANY back end database, regardless of the vendor, as long as the database schema is the same. -For example. you could have MS SQL Server and PostgreSQL servers which have -exactly the same data. Using ODBC, your Windows app would make exactly the +For example. you could have MS SQL Server + and Postgres servers which have +exactly the same data. Using ODBC, your Windows app would make exactly the same calls and the back end data source would look the same (to the windows app). + +Insight Distributors provides active and ongoing +support for the core psqlODBC distribution. They provide a +FAQ, ongoing development +on the code base, and actively participate on the +interfaces mailing list. + + +<productname>Windows</productname> Applications + -In the real world, differences in drivers and the level of ODBC support -lessens the potential of ODBC: +In the real world, differences in drivers and the level of ODBC support +lessens the potential of ODBC: -Access, Delphi, and Visual Basic all support ODBC directly. +Access, Delphi, and Visual Basic all support ODBC directly. -Under C++, such as Visual C++, you can use the C++ ODBC API. +Under C++, such as Visual C++, you can use the C++ ODBC API. -In Visual C++, you can use the CRecordSet class, which wraps the ODBC API -set within and MFC 4.2 class. This is the easiest route if you are doing +In Visual C++, you can use the CRecordSet class, which wraps the +ODBC API +set within an MFC 4.2 class. This is the easiest route if you are doing Windows C++ development under Windows NT. -If I write an app for PostgreSQL can I write it using ODBC calls -to the PostgreSQL server, or is that only when another database program +If I write an app for Postgres +can I write it using ODBC calls +to the Postgres server, or is that only when another database program like MS SQL Server or Access needs to access the data? -Again, the ODBC API set is the way to go. You can find out more at -Microsoft's web site or in your Visual C++ docs (if that's what you are -using.) +Again, the ODBC API set is the way to go. +You can find out more at +Microsoft's web site or in your Visual C++ docs (if that's what you are using.) -Visual Basic and the other RAD tools have Recordset objects that use ODBC +Visual Basic and the other RAD tools have Recordset objects that use ODBC directly to access data. Using the data-aware controls, you can quickly -link to the ODBC back end database (very quickly). +link to the ODBC back end database (very quickly). Playing around with MS Access will help you sort this out. Try using @@ -88,11 +112,107 @@ You'll have to set up a DSN first. + + + +<productname>Unix</productname> Applications + + +ApplixWare has an ODBC database interface +supported on at least some platforms. ApplixWare v4.4.1 has been +demonstrated under Linux with Postgres v6.4 +using the psqlODBC +driver contained in the Postgres distribution. + + +Configuration Files + + +The ~/.odbc.ini contains user-specified access information +for the psqlODBC +driver. The file uses conventions typical for Windows +Registry files, but despite this +restriction can be made to work. + + +Here is an example .odbc.ini file, +showing access information for three databases: + + +[ODBC Data Sources] +DataEntry = Read/Write Database +QueryOnly = Read-only Database +Test = Debugging Database +Default = Postgres Stripped + +[DataEntry] +ReadOnly = 0 +Servername = localhost +Database = Sales + +[QueryOnly] +ReadOnly = 1 +Servername = localhost +Database = Sales + +[Test] +Debug = 1 +CommLog = 1 +ReadOnly = 0 +Servername = localhost +Username = tgl +Password = "no$way" +Port = 5432 +Database = test + +[Default] +Servername = localhost +Database = tgl +Driver = /opt/postgres/current/lib/libpsqlodbc.so + +[ODBC] +InstallDir = /opt/applix/axdata/axshlib + + + +For Applix, here is an example ~/axhome/macros/login.am file: + +macro login + set_set_system_var@("sql_username@","tgl") + set_system_var@("sql_passwd@","no$way") +endmacro + + + +Supported Platforms + + +psqlODBC has been built and tested +on Linux. There have been reports of success +with FreeBSD and with Solaris. + + -- GitLab