I would suggest using either a prepared statement or even an ORM framework.
But to answer your question, you should replace:
kontostand = "Select betrag From Transaktion Where Konto_id = '" + kunde_id + "'";
with
kontostand = "Select betrag From Transaktion Where Konto_id = (" + kunde_id + ")";
^ ^