From Xojo Documentation

Database Connectionstrings. Are you finding it hard to remember database connection strings? Here is an easy-to-use reference of connection. Trusted Windows (PC) download Visual FoxPro ODBC Driver 6.0.1. Virus-free and 100% clean download. Get Visual FoxPro ODBC Driver alternative downloads.

  • 3Using Firebird

ODBC (Open Database Connectivity) is a database driver standard available on Windows, Mac and Linux. Using the ODBC plugin you can connect to any database for which you have an ODBC driver. ODBC drivers are available for almost any database. To use ODBC, you need to ensure the ODBCPlugin file is in the Plugins folder (it is there by default).

You can use ODBC with Desktop, Web and Console projects, but not iOS projects.

@HerbWolfe, Excel 2016 and older versions (at least back to excel 2007) always had support for reading dbf files. Using OLEDB or ODBC is 'direct' support in my book and could either be done from excel menus or writing a VBA macro. I don't think something you might simply do with menus is an indirect support. In the ODBC Data Sources dialog box, click New. In the Add Data Source dialog box, select Microsoft Visual FoxPro Driver from the Installed ODBC Drivers list box and click OK. In the ODBC Visual FoxPro Setup dialog box, enter the data source name, select the Database type, enter the path to the database or directory, and click OK. Firebird ODBC driver (32/64 bit) v.2.1 Devart ODBC Driver for Firebird provides high-performance and feature-rich connectivity solution for ODBC-based applications to access Firebird databases from Windows, Linux and Mac OS X, both 32-bit and 64-bit.

ODBC can be a great way to connect to databases that do not have a built-in Xojo database class, such as:

  • Firebird
  • IBM iSeries / DB 2

Connecting to a Database using ODBC

Mac ODBC Administrator

How you connect to an ODBC database depends on the database you are using. The first thing you need to do is configure the ODBC driver using the appropriate ODBC configuration tool for your operating system. On Windows you use the ODBC Data Source Administrator in the Control Panel or Settings. On Mac, you use the ODBC Administrator app in the Application/Utilities folder. In this tool you install the ODBC driver and enter the necessary credentials to connect to the database.

On Linux, you may have to edit configuration files. Consulting the docs for your Linux distribution.

This results in a DSN (Data Source Name). You can use the DSN to connect to the database in conjunction with the ODBCDatabase class in two ways. You can have your app prompt the user to choose a DSN using the operating system browser for selecting a DSN or you can supply the name of the DSN manually.This code supplies a blank DataSource property, which prompts the user for the DSN using the system dialog:

Var db AsNew ODBCDatabase
db.DataSource = '
Try
db.Connect
// Use the database
Catch error As DatabaseException
// Connection error
// or the user selected
// Cancel from the ODBC browser
End Try

Alternatively, you can provide a DSN name and supply credentials. This example uses the existing TestDSN to connect to the database:

Var db AsNew ODBCDatabase
db.DataSource = 'TestDSN'
db.UserName = 'broberts'
db.Password = 'streborb'
Try
db.Connect
// Use the database
Catch error As DatabaseException
// Connection error
End Try

Lastly, if you know the precise format used by the ODBC driver, you can create the DSN manually:

Var db AsNew ODBCDatabase
db.DataSource = 'DSN=TestDSN;UID=broberts;PWD=streborb'
Try
db.Connect
// Use the database
Catch error As DatabaseException
// Connection error
End Try

Sources for ODBC Drivers

Before you can connect to any database using ODBC, you will need to obtain an ODBC driver. Many database vendors make ODBC drivers available for free. Other sources include:

Using Firebird

Firebird is a completely free (cost and license), cross-platform database with some interesting features.

Although Xojo does not have a native plugin for connecting to Firebird, you can use the ODBC plugin in conjunction with the Firebird ODBC drivers to use Firebird with Xojo.

Firebird can be used two ways, as a database server or as an embedded database. This shows you how to use both using Firebird running on Windows.

Connect to the Server

Firebird ODBC Server Setup

Once you download and install Firebird (which should only take about a minute on Windows 10 using the default settings), you can then get the ODBC drivers, which have to be downloaded separately. Note, there are only ODBC drivers available for Windows and Linux on the Firebird site. You can find updated drivers (not free, but they have a 30-day trial), including ones for Mac from devart.

After installing the ODBC drivers, you can go to the ODBC Control Panel and add a data source by selecting the Firebird/Interbase driver from the list.

For the DSN name, use “FirebirdServerTest”.

Use this value for the Database property:

Use “SYSDBA” for the Database Account and “masterkey” as the password. You don’t need to change any other settings.

Automation and software systems — all backed by unrivalled customer service and support — we, through our AgieCharmilles, Microlution, Mikron Mill, Liechti, Step-Tec and System 3R technologies, help you raise your game and increase your competitive edge. Charmilles 2017 service manual. The Agie Charmilles literature center provides you with digital downloads (PDFs) of all of the currently available Agie, Charmilles and Mikron product literature, articles, and other printed materials. Click on a thumbnail image to view the PDF file.

Use the “Test connection” button in the window to verify that you can connect.

Connect Directly to a Database File

Firebird ODBC Local File Setup

If you did not already install the ODBC drivers from above, you will need to do so now. After installing the ODBC drivers, you can go to the ODBC Control Panel and add a data source by selecting the Firebird/Interbase driver from the list.

For the DSN name, use “FirebirdEmbeddedTest”.

Firebird includes a sample database, which should be located here:

C:Program FilesFirebirdFirebird_3_0examplesempbuildEMPLOYEE.FDB

Copy this file to the Desktop. Use “SYSDBA” for the Database Account and “masterkey” as the password. Click the “Test Connection” button to verify that everything is correct. If so, you are now ready to connect using Xojo.

Connecting Using Xojo

Now that you have created your ODBC DSN entries, you can use this with the Xojo ODBC plugin to connect to the database. The code to do this is similar to most Xojo database code. I’m going to have a single method that is used to connect using the specified DSN. This method is called ConnectToFirebird(dsn As String):

Var db AsNew ODBCDatabase
db.DataSource = dsn
Try
db.Connect
ListBox1.RemoveAllRows
Var SQL AsString = 'SELECT emp_no, full_name, job_code, job_country FROM employee;'
Dim rs As RowSet
rs = db.SelectSQL(SQL)
If rs <> NilThen
For Each row As DatabaseRow in rs
ListBox1.AddRow(rs.Colum('full_name').StringValue)
Next
rs.Close
End If
Catch error As DatabaseException
//a database error occurred
End Try
Firebird Example Data

This method connects to the sample database and adds all the names in the employee table to a ListBox. You can call this method and supply the name of the DSN to use to connect.

Add a button to test the embedded connection and add this code to its Action event handler:

ConnectToFirebird('FirebirdEmbeddedTest')

Now add a button to test the server connection and add this code to its Action event handler:

Run the app and click the buttons to see the ListBox get populated.

Learning More

Now that you know how to use Firebird, you can spend some time with its documentation to learn more about it.

See Also

ODBCDatabase, ODBCPreparedStatement classes; ODBCConstant module; UserGuide:Framework topic

Retrieved from 'http://docs.xojo.com/index.php?title=UserGuide:ODBC_Databases&oldid=71992'
Multimedia Business Messengers Desktop Development Education Games Graphics Home Networking Security Servers Utilities Web Dev Other
Sort by: Relevance

Visual FoxPro ODBC Driver

First of all, Microsoft Visual FoxPro is a powerful object-oriented environment for database construction and application development. Open, query, and update applications' data in Visual FoxPro and earlier versions of FoxPro through the Open Database Connectivity (ODBC) interface.

  • Publisher: Microsoft
  • Home page:msdn.microsoft.com
  • Last updated: March 28th, 2008

Microsoft OLE DB Provider for Visual FoxPro

The Visual FoxPro OLE DB Provider (VfpOleDB.dll) exposes OLE DB interfaces that you can use to access Visual FoxPro databases and tables from other programming languages and applications. The Visual FoxPro OLE DB Provider is supported by OLE DB System Components as provided by MDAC 2.6 or later. The requirements to run the Visual FoxPro OLE DB Provider are the same as for Visual FoxPro 9.0.

  • Publisher: Microsoft
  • Home page:www.microsoft.com
  • Last updated: March 20th, 2008
Visual

PI ODBC Driver

PI ODBC Driver is an ODBC 3.8 API-compliant driver that provides robust data access to the PI System through the use of SQL queries. PI ODBC Driver uses the PI SQL Data Access Server (PI SQL DAS) as a gateway, which provides secure network communication (net.tcp and HTTPS) and executes the queries.

  • Publisher: OSIsoft, LLC.
  • Home page:techsupport.osisoft.com
  • Last updated: March 25th, 2016

OpenNumismat

OpenNumismat is a handy and reliable application aimed at coin lovers, numismatists or amateurs looking to create a numismatics collection.

  • Publisher: JANIS
  • Home page:opennumismat.github.io
  • Last updated: October 23rd, 2020

ODBC Driver for PostgreSQL

Devart ODBC Driver for PostgreSQL provides high-performance and feature-rich connectivity solution for ODBC-based applications to access PostgreSQL databases from Windows, Linux and Mac OS X, both 32-bit and 64-bit.

  • Publisher: Devart
  • Home page:www.devart.com
  • Last updated: November 7th, 2017

ODBC Driver for SQL Azure

Devart ODBC Driver for SQL Azure provides high-performance and feature-rich connectivity solution for ODBC-based applications to access SQL Azure databases from Windows, both 32-bit and 64-bit.

  • Publisher: Devart
  • Home page:www.devart.com
  • Last updated: November 7th, 2017

Devart ODBC Driver for SQL Server

Devart ODBC Driver for SQL Server provides high-performance and feature-rich connectivity solution for ODBC-based applications to access SQL Server databases from Windows, Linux and Mac OS X, both 32-bit and 64-bit.

  • Publisher: Devart
  • Home page:www.devart.com
  • Last updated: May 27th, 2020

ODBC Driver for SQL Server

Devart ODBC Driver for SQL Server provides high-performance and feature-rich connectivity solution for ODBC-based applications to access SQL Server databases from Windows, Linux and Mac OS X, both 32-bit and 64-bit.

Visual Foxpro Obdc Driver Excel 2016 For Mac
  • Publisher: Devart
  • Home page:www.devart.com
  • Last updated: November 7th, 2017

Microsoft Data Access Components SP1

Microsoft Data Access Components (MDAC) SP1 contains core Data Access components such as the Microsoft SQL Server OLE DB provider and ODBC driver. This redistributable installer for the MDAC SP1 release installs the same Data Access components as Microsoft Windows XP SP2.

  • Publisher: Microsoft Corporation
  • Home page:www.microsoft.com
  • Last updated: February 22nd, 2012

Microsoft Hive ODBC Driver

Microsoft Hive ODBC Driver is a connector to Apache Hadoop Hive available as a part of HDInsight clusters. This tool enables Business Intelligence, Analytics and Reporting on data in Apache Hive. It is an established API for connecting to and working with databases.

  • Publisher: Microsoft Corporation
  • Home page:www.microsoft.com
  • Last updated: April 30th, 2015

Firebird ODBC Driver

Firebird ODBC Driver 2.0.5.156

Visual Foxpro Odbc Driver

  • Publisher: Firebird Project
  • Home page:www.devart.com
  • Last updated: May 20th, 2016

MySQL ODBC Driver

MySQL Connector/ODBC (also known as MyODBC) allows you to connect to a MySQL database server using the ODBC database API on all Microsoft Windows and most Unix platforms, including through such applications and programming environments such as Microsoft Access, Microsoft Excel, and Borland Delphi.

  • Publisher: Dell Inc.
  • Home page:dev.mysql.com
  • Last updated: December 2nd, 2009

SQLite ODBC Driver

SQLite ODBC Driver is a software solution that connects ODBC-based applications to SQLite databases thus ensuring a better connectivity. It is compatible with both 32 and 64-bit operating systems, and thanks to the direct TCP/IP link to the database it provides a high-quality performance and processing speed.

  • Publisher: Devart
  • Home page:www.devart.com
  • Last updated: May 26th, 2020

Lotus NotesSQL ODBC Driver

Lotus NotesSQL ODBC Driver 8.0.2007.904

  • Publisher: IBM Lotus
  • Home page:www.ibm.com
  • Last updated: May 4th, 2008

Devart ODBC Driver for PostgreSQL

Devart ODBC Driver for PostgreSQL provides high-performance and feature-rich connectivity solution for ODBC-based applications to access PostgreSQL databases from Windows, Linux and Mac OS X, both 32-bit and 64-bit.

  • Publisher: Devart
  • Home page:www.devart.com
  • Last updated: May 27th, 2020

Microsoft ODBC Driver for SQL Server

Microsoft ODBC Driver 11 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 2005, 2008, 2008 R2, SQL Server 2012 and Windows Azure SQL Database.

  • Publisher: Microsoft Corporation
  • Home page:www.microsoft.com
  • Last updated: May 7th, 2014

Visual Foxpro Driver Download

Devart ODBC Driver for MySQL

Visual Foxpro Odbc Driver Download

Devart ODBC Driver for MySQL provides high-performance and feature-rich connectivity solution for ODBC-based applications to access MySQL databases from Windows, both 32-bit and 64-bit.

  • Publisher: Devart
  • Home page:www.devart.com
  • Last updated: May 27th, 2020

Devart ODBC Driver for Oracle

Visual Foxpro Database Driver

Devart ODBC Driver for Oracle provides high-performance and feature-rich connectivity solution for ODBC-based applications to access Oracle databases from Windows, Linux and Mac OS X, both 32-bit and 64-bit.

  • Publisher: Devart
  • Home page:www.devart.com
  • Last updated: April 19th, 2020