Library tutorials & articles
Using MySQL with .NET
- Introduction
- Connecting to the Database
Introduction
Ever wanted to combine the power and ease of the .NET platform with a free database like MySQL? Well thanks to ODBC database functions in ADO.NET it's really easy. All you need is the latest drivers for ADO.NET and MySQL installed. For this tutorial we will use C# to build a simple application for reading a table built in MySQL. This assumes at least basic knowledge of C# and .NET.
Creating the Database
To start the project, we will need to create a mysql database to work with. Create a new database called mysqlsample and create a new table like this:
mysql> create database mysqlsample;
mysql> use mysqlsample;
mysql> create table tutorials (id int not null auto_increment, title varchar(80) not null, link varchar(255) not null, primary key(id));
mysql> insert into tutorials values (1, ‘DOT.NET For Dummies', ‘http://www.dotnetfordummies.com');
mysql> insert into tutorials values (2, ‘XML For Idiots', ‘http://www.xmlforidiots.com');
mysql> insert into tutorials values (3, ‘Windows For Wimps', ‘http://www.windowsforwimps.com');
Related articles
Related discussion
-
class file in C#
by glad024 (0 replies)
-
Storing images into MySQL using C#
by Onaopepo (1 replies)
-
Looking for .Net C# Software Developers
by sugagirisa (2 replies)
-
Lets Open our Eyes
by mawcot (0 replies)
-
LINQ in Action
by naser1 (0 replies)
Related podcasts
-
Object-Oriented Programming in Ruby
In this episode, I talk with Scott Bellware about object-oriented programming in Ruby, and Ruby's object model. This is taken from a private conversation, and the audio quality suffers at times. Much thanks to Scott for allowing this to be released.This episode of the Alt.NET Podcast is bro...
Events coming up
-
Nov
8
The Los Angeles PHP Developers November Meetup
Santa Monica, United States
As usual, our monthly schmooze meeting. This is an informal networking and discussion get together. It's a meetup mash-up of the Los Angeles PHP / MySQL / Semantic Web meetup groups. A great group of PHP developers and enthusiasts discussing various issues on PHP and software development as well as latest trends in web-related technologies.
http://dev.mysql.com/downloads/connector/net/5.0.html you get the connector along with a basic documnetion that will help you with Connecting to the Mysql database.
being a Mysql fan will also tell people who do not want to have transaction support that mysql with a myisam type table is blazingly fast.
regards
David Xavier
This thread is for discussions of Using MySQL with .NET.