How to connect to MySQL by using ADO .NET and C# 4.0

0 Comments

Download the MySQL drivers at: http://dev.mysql.com/downloads/connector/net/ Install the drivers on you’re development machine.   At references to: – System.Data – MySql.Data [C:\Program Files (x86)\MySQL\MySQL Connector Net 6.4.3\Assemblies\v4.0\MySql.Data.dll]   The following code will output all database

How to query a Microsoft SQL Server database with Microsoft ADO .NET 3.5

0 Comments

The following C# code will query a log table on a Microsoft SQL Server database by using Microsoft ADO .NET 3.5:         public bool DoesLogTableContainMessage(stringmessage)         {             bool result = false;             using(DataTable dataTable