Autor Beitrag
tomycat
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 265
Erhaltene Danke: 1



BeitragVerfasst: Mi 01.07.15 21:37 
hallo,

Id Tier futter
1 Hunde fleisch
2 Hase Karotten
3 Ich Pfannkuchen

die mysql Tabelle möchte ich gerne in einer Textbox (später listbox)haben.
ausblenden C#-Quelltext
1:
2:
3:
4:
5:
6:
7:
mcon.Open();
s = "select * from blabla.blabla where ersterteil=" + int.Parse(meineids.Text);
mcd = new MySqlCommand(s, mcon);
mdr = mcd.ExecuteReader();
if (mdr.Read())
{
}

mit einer forschleife befülle ich die Textbox.Problem: wie bekomme ich heraus, wieviele id´s ich habe?

Moderiert von user profile iconTh69: C#-Tags hinzugefügt
Palladin007
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1282
Erhaltene Danke: 182

Windows 11 x64 Pro
C# (Visual Studio Preview)
BeitragVerfasst: Mi 01.07.15 21:42 
ADO.NET als Oberbegriff
Entity Framework, LinqToSql, DataSets, etc.

Versuch's zur Abwechslung mal mit Suchen.
Sowas mit Hilfe von Google zu finden ist mit einer Sekunde Nachdenken echt kein Akt.

Wenn Du dann ein konkretes Problem hast, dann bekommst Du von mir auch eine anständige Antwort.

Für diesen Beitrag haben gedankt: tomycat
tomycat Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 265
Erhaltene Danke: 1



BeitragVerfasst: Do 09.07.15 20:56 
die Antwort ist ok.
die Stichworte nutze ich zum googlen.