sql >> Databasteknik >  >> RDS >> Mysql

Visa databaser för MySql-server

string myConnectionString = "SERVER=localhost;UID='root';" + "PASSWORD='root';";
MySqlConnection connection = new MySqlConnection(myConnectionString);
MySqlCommand command = connection.CreateCommand();
command.CommandText = "SHOW DATABASES;";
MySqlDataReader Reader;
connection.Open();
Reader = command.ExecuteReader();
while (Reader.Read())
{
  string row = "";
  for (int i = 0; i < Reader.FieldCount; i++)
       row += Reader.GetValue(i).ToString() + ", ";
       comboBox1.Items.Add(row);
}
connection.Close();


  1. Laravel 4:Where Not Exists

  2. Finns det en visning i all (set division?) operation inbyggd i MySQL?

  3. Topptrender inom databashantering

  4. MS Access till Oracle enkel konvertering/migrering