DATA used: CREATE TABLE IF NOT EXISTS `employee` ( `firstname` varchar(32) DEFAULT NULL, `lastname` varchar(32) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -- Dumping data for table `employee` -- INSERT INTO `employee` (`firstname`, `lastname`) VALUES ('testcs', 'testcs'); <%@ import Namespace="System" %> <%@ import Namespace="System.Data" %> <%@ import Namespace="MySql.Data.MySqlClient" %> <% string connectionString = "Server=localhost;" + "Database=;" + "User ID=;" + "Password=;" + "Pooling=false"; IDbConnection dbcon; dbcon = new MySqlConnection(connectionString); dbcon.Open(); IDbCommand dbcmd = dbcon.CreateCommand(); string sql = "SELECT firstname, lastname " + "FROM employee"; dbcmd.CommandText = sql; IDataReader reader = dbcmd.ExecuteReader(); while(reader.Read()) { string FirstName = (string) reader["firstname"]; string LastName = (string) reader["lastname"]; Response.Output.Write("Name: " + FirstName + " " + LastName); } // clean up reader.Close(); reader = null; dbcmd.Dispose(); dbcmd = null; dbcon.Close(); dbcon = null; %>