IndexOutOfRangeException when invoking a stored procedure
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 55/100
Piste de recherche
The payload names no source files, so begin by searching the MsSql provider for where stored procedure parameters are filtered by direction (ReturnValue) and mapped to supplied values. Reproduce with a procedure that has an output result set and no matching input value, then confirm the IndexOutOfRangeException. Done means the call succeeds, the result set is returned, and the existing stored procedure tests still pass.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Describe the bug
When using InvokeAsync on a stored procedure while using SqlProvider.MsSql the list of input parameters include all of the input parameters defined by the stored procedure given a direction of Input as well as the result set given a direction of Output. The list of values provided match the number of input parameters marked with a direction of Input. When the input parameters are processed in order to map them to values and create command parameters, the input parameters are filtered to remove those with a direction of ReturnValue, then attempt to map over the values. In my specific situation where I have a stored procedure with five parameters and one result set, I have six input parameters and five values. After filtering out direction of ReturnValue there are still six input parameters, and after processing the first five input parameters commands are created mapped to the five values provided, but then the sixth input parameter which has a direction of Output results in an IndexOutOfRangeException when it attempts to map to the nonexistent sixth value.
To Reproduce
Steps to reproduce the behavior:
- Call
InvokeAsyncon a stored procedure usingSqlProvider.MsSql - Get
IndexOutOfRangeExceptionbefore the procedure is called
Expected behavior
The stored procedure is called with the given values and the result set is retrieved.
Environment (please complete the following information):
- Database: MsSql
- Nuget Package and version: SQLProvider.MsSql 1.5.7
- OS: Windows
- .NET 10
Additional context
This error was introduced in my project when I upgraded from SqlProvider 1.3.19 to SqlProvider.MsSql 1.5.7. I don't know exactly what it was doing internally previously, but I would assume either the result set was not being created as an input parameter, or it was being created as an input parameter with a direction of ReturnValue which was being filtered out when creating command parameters. My naïve solution to this would be to also filter out Output direction, or perhaps only keep Input direction, though I don't know what that would do in other situations.
- Langage dominant
- F#
- Étoiles
- 627
- Forks
- 148
- Merge moyen
- 2 h 2 min
- PR mergées (30 j)
- 1
Préparer son environnement
Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Aucun guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de fsprojects/SQLProvider
-
enhancement
Difficulté 3/5 1-2 jours Accessibilité débutants 55/100
fsprojects/SQLProvider#872 · 2 commentaires ·
-
Repo Assist?Ouverteenhancement
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 10/100
fsprojects/SQLProvider#870 · 1 commentaire ·
-
postgresql
Difficulté 4/5 3-5 jours Accessibilité débutants 58/100
fsprojects/SQLProvider#869 · 2 commentaires ·
-
documentation
Difficulté 2/5 1-3 heures Accessibilité débutants 42/100
fsprojects/SQLProvider#868 · 2 commentaires ·
-
sql server
Difficulté 4/5 3-5 jours Accessibilité débutants 45/100
fsprojects/SQLProvider#851 · 1 commentaire ·
Toutes les issues de fsprojects/SQLProvider
Issues similaires
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
OpenIntegrationEngine/engine#496 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 85/100
Les mainteneurs répondent en général sous 4 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
tursodatabase/turso#10054 ·
Les mainteneurs répondent en général sous 1 jour
-
Connection.prototype.bulkWrite() with ordered: false resolves null when a write failsPeut-être pris @maxymlyskov l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Automattic/mongoose#16601 ·
Les mainteneurs répondent en général sous 2 jours
-
Filters: ?field:ne=null matches NULL rows instead of non-NULL onesPeut-être pris @rshdhere l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
Netflix/metaflow-service#504 ·