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:
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
.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
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
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
Npgsql is an open source ADO.NET Data Provider for PostgreSQL and is included in the Liquid Studio installation.
Connect to a SQLite Database
System.Data.SQLite is an ADO.NET Data Provider for SQLite and is included in the Liquid Studio installation.