<!DOCTYPE html><html><head><metacharset="ISO-8859-1"><title>javascript</title></head><body><pid="demo"></p><pid="demo1"></p><script type="text/javascript">var a;
var result="";
/* while (a <= 10) { result += "<br>" + a; a++; }*/var names = ["tom", "mark","Ben","jack","john"];
for (a=0,result=""; a < names.length ; a++) {
result +="<br>"+ names[a];
}
document.getElementById("demo").innerHTML= result ;
var student = {name:"Mark", surname:"tesar", age:22};
var x;
var result1="";
for (x in student)
result1 +="<br>"+ student[x];
document.getElementById("demo1").innerHTML= result1 ;
</script></body></html>
usingSystem;
usingSystem.Collections.Generic;
usingSystem.ComponentModel;
usingSystem.Data;
usingSystem.Drawing;
usingSystem.Linq;
usingSystem.Text;
usingSystem.Threading.Tasks;
usingSystem.Windows.Forms;
usingMySql.Data.MySqlClient;
namespaceMySqlConn
{
publicpartialclassForm1 : Form
{
MySqlConnection conn;
string connString;
publicForm1()
{
InitializeComponent();
}
privatevoidbutton1_Click(object sender, EventArgs e)
{
connString = "SERVER= 127.0.0.1;PORT=3306;DATABASE=database_name;UID=user;PASSWORD=pass;";
try
{
conn = new MySqlConnection();
conn.ConnectionString = connString;
conn.Open();
MessageBox.Show("connection success");
string query = "SELECT * FROM employee_data";
//Create Command
MySqlCommand cmd = new MySqlCommand(query, conn);
//Create a data reader and Execute the command
MySqlDataReader dataReader = cmd.ExecuteReader();
//Read the data and store them in the listwhile (dataReader.Read())
{
Console.WriteLine(dataReader["id"] + "");
Console.WriteLine(dataReader["name"] + "");
Console.WriteLine(dataReader["surname"] + "");
Console.WriteLine(dataReader["age"] + "");
}
conn.Close();
}
catch (MySql.Data.MySqlClient.MySqlException ex)
{
MessageBox.Show(ex.Message);
}
}
}
}
Connect C# to MySQL How to Connect to MySQL Using C# c# - How to connect to MySQL Database? MySQL .NET With C# C# Windows Form Application Mysql Connection c# - How can I connect to MySQL from windows forms? Using Visual C# Windows Forms with MySQL C# Programming for beginners: How to connect MySQL Database Windows Form Application using Mysql Server Connect MySQL from C# Windows Forms mysql problem to connect with windows form c# C# Windows Form Application Mysql Connection Mysql And Visual C# 2010 Windows Form Application MySQL :: Connecting to MySQL with a Windows Form application C# Form textbox string into SQL Database visual c# CLR windows form application and mysql assembly reference not working in C# script Trying to connect to MySQL from C# application mysql and C# window form application How to connect MySQL using C#?