| TechTasks.net |
The Blog is Moved to www.TechTasks.net
Introduction
If you're creating a web application using C# ASP .NET, you will more than likely be using one of the three top database engines MySQL, MSSQL (Microsoft SQL Server), or Oracle to store your online data. From the developer's view, all three databases are virtually the same. You use the same generic framework calls to connect, read, and write data. While it is more common to use Microsoft's MSSQL Server with a .NET application, a large number of web hosts offer the free MySQL database. Therefore, connecting to a MySQL database from C# ASP .NET is an important task and is actually quite easy to do.
Using MySQL with C# ASP .NET
MySQL is a free database and is used very heavily by the linux developers usually when programming with Perl, CGI, or Ruby on Rails. Because of this, MySQL is, for the most part, catered and optimized directly towards the linux developing platform. However, using MySQL from a Windows web application is also supported and MySQL offers several drivers just for Windows users.
The actual library you choose to connect to the database from C# ASP .NET can make a huge impact on the speed and reliability of your database transactions. In addition, your web server may only be configured to use a specific database library from within C#. Choosing the correct database library to use is an important decision in your web application design.
MySQL and MySQLDriverCS
MySQLDriverCS http://sourceforge.net/projects/mysqldrivercs is a free driver framework for connecting to MySQL from within a C# ASP .NET application. It uses the
using MySQLDriverCS;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
MySQLConnection myConn;
myConn = new MySQLConnection(new MySQLConnectionString("localhost", "databse", "User", "password").AsString);
MySQLDataAdapter da = new MySQLDataAdapter("select * from dental", myConn);
DataSet ds = new DataSet();
da.Fill(ds, "raji");
GridView1.DataSource = ds;
GridView1.DataBind();
}
}
Blog Archive
-
▼
2008
(33)
-
►
December
(14)
- Non Editable Rows in GridView
- Validate DropDownList inside GRIDVIEW
- .Net Keyboard Shortcuts
- Grid View Operataions
- FAQ'S & INTERVIEW TIPS
- C#.NET
- ASP.NET
- DOTNET FRAMEWORK
- Projects With Source Code
- Enter Text In Into Two TextBoxes At the Same Time
- Saving Uploaded file into Disk and displaying the ...
- Writing Connection string in web.config file
- Change GridView Row Color When MouseOver
- Working With Command Builder in ASP.NET
-
▼
November
(14)
- JavaScript Validatoin For Basic Controles in ASP.N...
- Dot Net - C#.Net(FAQ'S)
- Dot Net - Asp.Net - Basic II(FAQ'S)
- Dot Net - Asp.Net - Basic I(FAQ'S)
- Famous Books For .NET
- Connecting MySql With Asp.net Using ODBC Drivers
- Simple Calculator In Windows Application Using C#
- Mail Sending Using Net.Mail
- Select All And Delete Using CheckBox In GridView
- GridView DeleteAll,SelectAll,ClearAll(Server Side)...
- GridView Paging & Sorting
- GridView Update,Delete,Adding (Insert) Record...
- Alphabetical Paging in Gridview
- Connecting MySql With C# ASP.NET
-
►
December
(14)


2 comments:
Hi! How do you show me the detail step to include the file file libMySQL.dll within your /bin folder?
I cann't do it!
hi! Do you show me the detail step to include the file libMySQL.dll within your /bin folder?
I cann't do it?