Habe es herausgefunden:
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31:
| string source = "DSN=test-gamma1-archiv-r;Uid=...;Pwd=..."; OdbcConnection connection = new OdbcConnection(source); try { OdbcCommand command = new OdbcCommand("{ ? = CALL GET_HOST_DATE(?) }", connection); command.CommandType = CommandType.StoredProcedure;
OdbcParameter parameter = command.Parameters.Add("RETURN_VALUE", OdbcType.DateTime); parameter.Direction = ParameterDirection.ReturnValue; connection.Open(); Console.WriteLine(command.ExecuteScalar()); command.Dispose();
Console.ReadLine(); } catch (Exception OdbcException) { System.Console.WriteLine(OdbcException.Message); Console.ReadLine(); } finally { connection.Dispose(); connection.Close(); } |
Die Problematik war, dass der neue Oracle-RDB-Treiber ab Version 3.0 keinen Returnwert mehr liefert. Die früheren Versionen schon.
Call wurde bei Oracle eröffnet.
Moderiert von jasocul: C#-Tags hinzugefügt