Using Databases with Liquid Data Mapper - Tutorial Using Databases with Liquid Data Mapper - Tutorial

Home > XML Tutorials > Using Databases with Liquid Data Mapper

VIEW VIDEO Database Data Mapper

This video tutorial shows you how to connect to and configure a database data source.

Using Databases with Liquid Data Mapper

This tutorial explains how to use Databases with Liquid Data Mapper.

The article discusses ADO.Net requirements of each database provider, and demonstrates how to follow these steps:

  • Connect to a Microsoft SQL Server Database
  • Connect to a MySQL Database
  • Connect to an Oracle Database
  • Connect to a PostgreSQL Database
  • Connect to a SQLite Database
  • Connect to a VistaDB 5 Database
  • Connect to a VistaDB 6 Database

Useful Database Data Mapper Links

What is an ADO.NET Database Provider?

ADO.NET is a Microsoft technology used to provide generic access to various data sources, and specifically uses .NET Framework data providers for connecting to databases.

Each database manufacturer, or an independent third party, who requires .Net connectivity can produce a database driver conforming to the ADO.NET database provider standard. This can then be used by .Net applications to connect easily with the database.

Liquid Data Mapper is a .Net application and so utilises ADO.NET for easy connectivity to various databases.

What are Connection Strings?

A connection string contains initialization information that is used by a data provider to connect to a database. When using the Liquid Data Mapper you will need to specify a connection string to connect to your database. Although connection strings are fairly easy to understand, the Database Connection dialog helps you to build the connection string for your selected database and data provider.

Connection String Examples

Example of a Connection String used to connect to the 'Northwind' catalog of a local SQL Server database using trusted connection:

"Data Source=(local);Initial Catalog=Northwind;Integrated Security=true;"
                

Example of a Connection String used to connect to the 'Northwind' catalog of a remote SQL Server database using username and password:

"Data Source=myServer;Initial Catalog=Northwind;User Id=myUser;Password=myPassword;"
                

Connect to a Microsoft SQL Server Database

Prerequisites

.NET Framework Data Provider for SQL Server

The Microsoft .Net Framework includes the ADO.NET Data Provider for Microsoft SQL Server, so nothing additional is required.

Connect to a MySQL Database

Prerequisites

Option 1 - MySQL Connector/NET (dev.mysql.com)

This is the official MySQL ADO.NET Data Provider and can be download from their web site.

Once installed the driver should be automatically recognised by Liquid Studio and the option displayed in the Database Connection dialog.

Option 2 - MySqlConnector (mysqlconnector.net)

This is a 3rd party MySQL ADO.NET Data Provider and is included in the Liquid Studio installation.

Connect to an Oracle Database

Prerequisites

Option 1 - .NET Framework Data Provider for Oracle

The Microsoft .Net Framework includes a legacy ADO.NET Data Provider for Oracle 7.3, 8i, 9i and 10g. This driver has been deprecated and should no longer be used.

Option 2 - ODP.NET (oracle.com)

ODP.NET is the official Oracle ADO.NET Data Provider and is included in the Liquid Studio installation.

Connect to a PostgreSQL Database

Prerequisites

Npgsql (npgsql.org)

Npgsql is an open source ADO.NET Data Provider for PostgreSQL and is included in the Liquid Studio installation.

Connect to a SQLite Database

Prerequisites

System.Data.SQLite (system.data.sqlite.org)

System.Data.SQLite is an ADO.NET Data Provider for SQLite and is included in the Liquid Studio installation.

Simplifies Development & Reduces Bugs Free Trial

More Editors and Tools

FEATURE DETAILS XML Data Binder

XML Data Binder

FEATURE DETAILS Graphical XSD Editor

Graphical XML Schema Editor(XSD)

FEATURE DETAILS XML Data Binding Editions

XML Data Binding Editions