Describe the bug
Sybase does not allow for duplicate parameters in commands.
Trying to execute them will at best give you an exception from sybase, at worst (how I discovered this) it won't return anything in the socket connection, causing AseClient to think the socket closed. (this was a bit annoying to debug).
To Reproduce
var _aseCommand = connection.CreateCommand("select @p1, @p2");
_aseCommand.Parameters.Add("@p1", "test");
_aseCommand.Parameters.Add("@p2", "test2");
_aseCommand.Parameters.Add("@p1", "test3");
var reader = _aseCommand.ExecuteReader();
Expected behavior
Either AseCommand.ExecuteReader or AseParameterCollection.Add should throw ArgumentException when a duplicate key is used.
Environment
- .NET Framework/Core version
Core 3.1
AdoNetCore.AseClient nuget package version: 0.18.0, assembly version: 0.11.0.0
Additional context