Hallo,
ich will eine
in der Datenbank gespeicherte Prozedur über ein C# Programm ausführen, weiß aber nicht, wie ich Parameter einem Command hinzufüge. Es handelt sich dabei um eine Firebird-Datenbank, aber die Synthax ist ja ziemlich ähnlich.
C#-Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18:
| using (FbConnection connection = new FbConnection(this.ConnectionString)) { string parameter = "123456789"; connection.Open();
using (FbCommand command = connection.CreateCommand()) { command.CommandType = System.Data.CommandType.StoredProcedure; command.CommandText = "MeineProzedur"; using (FbDataReader reader = command.ExecuteReader()) { reader.Read(); } } } |
Ein einfaches Beipiel würde mir schon reichen.
Tipps und Erklärung würden mir weiterhelfen. Danke dafür!