Aus irgendeinem Grund konnte ich keine gute Antwort in Google finden, warum dieser Code nicht funktioniert:
MySqlConnection connection = new MySqlConnection("Databaseyeshuv1");
MySqlCommand command = connection.CreateCommand();
MySqlDataReader Reader;
command.CommandText =
"SELECT * FROM `MASADE_FEA_bak2` WHERE `marom_num` equals `3`";
connection.Open();
Reader = command.ExecuteReader();
while (Reader.Read())
{
string line = Reader.GetString(1);
this.__.Text = line;
}
connection.Close();
Ich erhalte folgende Fehlermeldung:
System.ArgumentException: Format des Initialisierungsstrings entspricht nicht der Spezifikation ab Index 0. at System.Data.Common.DbConnectionOptions.GetKeyValuePair(String connectionString, Int32 currentPosition, StringBuilder buffer, Boolean useOdbcRules, String& keyname, String& keyvalue) at System. Data.Common.DbConnectionOptions.ParseInternal(Hashtable parsetable, String connectionString, Boolean buildChain, Hashtable synonyms, Boolean firstKey) at System. Data.Common.DbConnectionOptions..ctor(String connectionString, Hashtable synonyms, Boolean useOdbcRules) at System.Data.Common.DbConnectionStringBuilder.set_ConnectionString(String value) at MySql.Data.MySqlClient. MySqlConnection.set_ConnectionString(String value) at MySql.Data.MySqlClient.MySqlConnection..ctor(String connectionString) at MyApp7.UI.Controls.ShowMASADE_FEA_bak2.KomotMASADE_FEA_bak2TableControlRow.Set__()