BitDaddys Corp.
BitDaddys offers msg file solutions!

Email, Database and IT Solutions


Main Menu
Home

Product Sections
Product Locator
Email Utilities
Database Utilities
Other Products

Reference Sections
Articles
MySQL
Outlook - Import EML
.net Network Security
Flash
Fireworks
PHP
DB/C
Java
Email File Extensions
EML email file extension
MSG email file extension
TNEF email file extension
TXT email file extension
HTML email file extension
Java Script

OISV - Organization of Independant Software Vendors - Charter Member

Recommended Links

Get Firefox



Get Thunderbird  

MySQL

Find good sites at
Find good sites at Gimpsy  

 

Web Master:

Keith Birchfield


MSGDETACH
MySql Excel Exporter
BitDaddys Corp.
FREE

More Info
Free Download
Create Excel Spreadsheets from your MySQL data. more ...
MySQL Tutorials Table Of Contents
Part 1: Start MySQL and Create Databases and Tables (Create)
Part 2: Add Data (Insert and Replace)
Part 3: Show Data (Select)
Part 4: Delete Data (Delete and Drop)
Part 5: Backup Data (Dump)
How to use C# and MySQL Connector/Net


How to connect to MySQL 5.0. via C# .Net and the MySql Connector/Net


This article and tutorial describes and demonstrates how you can connect to MySQL in a c# application.

  • First, you need to install the mysql connector/net, it is located at: http://dev.mysql.com/downloads/connector/net/1.0.html
  • Next create a new project
  • Next add reference to: MySql.Data
  • Next add "using MySql.Data.MySqlClient;"
  • Finally add the following code to your application:
private void button1_Click(object sender, System.EventArgs e)
{
string MyConString = "SERVER=localhost;" +
"DATABASE=mydatabase;" +
"UID=testuser;" +
"PASSWORD=testpassword;";
MySqlConnection connection = new MySqlConnection(MyConString);
MySqlCommand command = connection.CreateCommand();
MySqlDataReader Reader;
command.CommandText = "select * from mycustomers";
connection.Open();
Reader = command.ExecuteReader();
while (Reader.Read())
{
string thisrow = "";
for (int i= 0;i<Reader.FieldCount;i++)
thisrow+=Reader.GetValue(i).ToString() + ",";
listBox1.Items.Add(thisrow);
}
connection.Close();
}

 


 

@bitdaddys

Highlighted Products
Email Pack

Email Pack
BitDaddys Corp.
$39.95

More Info
Buy Now!

Email conversion and action pack. Get all of our powerful email utilities for one very low price! more ...

EML and MSG converter
BitDaddys Corp.
$16.00

More Info
Free Trial
Buy Now!
Convert eml and msg Files into EML, MSG,MHT more ...

EMLDETACH
email Open View Pro
BitDaddys Corp.
$19.95

More Info
Trial Version
Buy Pro Now!
View .msg and .eml Email Files Print email. Extract Attachments. Convert to PDF, BMP, GIF, JPG and more ...

outlookFiller64
BitDaddys Corp.
$19.95

More Info
Free Trial
Buy Now!
Import eml and msg Files into 64 bit Outlook more ...

EMLDETACH
EMLDETACH
BitDaddys Corp.
$14.00

More Info
Free Trial
Buy Now!
Detach Email Attachments from your .eml files and Save them wherever you want! Extract your message attachments from eml files. more ...

EMLDETACH

emlResender
BitDaddys Corp.
$14.00

More Info
Free Trial

Buy Now!

.eml file sender, RFC-822 resender more ...

outlookFiller
BitDaddys Corp.
$14.00

More Info
Free Trial
Buy Now!
Import eml and msg Files into Outlook more ...

PopTransAct
BitDaddys Corp.
$19.95

More Info
Free Trial
Buy Now!
POP3 Email Transfers and Actions. Extract, Archive Save and Merge Attachments. Archive and forward Messages from any POP3 Account, even gmail! more ...

MSGDETACH
mboxPack
BitDaddys Corp.
$10.00

More Info
Free Trial
Buy Now!
Pack email files into mbox files. Plain text, individual eml,msg,txt files to Thunderstor compatable and ready to use mbox more ...




About Us | Site Map | Privacy | Contact Us |
©2004-2011 BitDaddys Corp.