IndexOutOfRangeException when invoking a stored procedure
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 55/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- F#
- Stelle
- 626
- Fork
- 148
- Merge medio
- 2h 16m
- PR unite (30g)
- 2
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di fsprojects/SQLProvider
-
enhancement
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
fsprojects/SQLProvider#872 · 2 commenti ·
-
Repo Assist?Apertaenhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 10/100
fsprojects/SQLProvider#870 · 1 commento ·
-
postgresql
Difficoltà 4/5 3-5 giorni Idoneità per principianti 58/100
fsprojects/SQLProvider#869 · 2 commenti ·
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 42/100
fsprojects/SQLProvider#868 · 2 commenti ·
-
sql server
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
fsprojects/SQLProvider#851 · 1 commento ·
Tutte le issue di fsprojects/SQLProvider
Issue simili
-
[Bug] Statistics | Task statistics are always empty on MikroORM with MySQL or SQLiteForse già presa @NdekoCode l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
ever-co/ever-gauzy#11214 ·
I maintainer di solito rispondono entro 1 giorno
-
Illinois HBWD premium bands charge the next band's premium at each band edgeForse già presa @hua7450 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
PolicyEngine/policyengine-us#10369 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
renecotyfanboy/jaxspec#298 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement good first issue helia storage tier-1
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
QMeshPy/distributed-quantum#53 ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG]: drizzle-kit pull (MSSQL) crashes on computed columns when the login lacks VIEW DEFINITIONAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
drizzle-team/drizzle-orm#6564 ·
I maintainer di solito rispondono entro 2 giorni