You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
…ess issue # 188 by include the IsUnique as well as IsKey in the validation to determine hasKey
Address issue DataAction#192 for duplicate parameter name
Update test cases
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
Expected behavior
Either
AseCommand.ExecuteReader
orAseParameterCollection.Add
should throwArgumentException
when a duplicate key is used.Environment
Core 3.1
AdoNetCore.AseClient
nuget package version:0.18.0
, assembly version:0.11.0.0
Additional context
The text was updated successfully, but these errors were encountered: