I sent multiple parameters via a hashtable to the BD
code:
Dim listeCdeAemettre As IList = New ArrayList()
Dim parameters As New Hashtable
parameters("listeRayon") = listeRayonAutorise
parameters("nomFournisseur") = "interforum"
parameters("codePorteFeuille") = "prtfl"
'parameters("Num") = 8
Try
listeCdeAemettre = mappeurIbm5000.QueryForList("FindAllCdeAEmettre", parameters)
Return listeCdeAemettre
The problem is, until 3 parameter, everything is ok; when I add the 4th, I have an exception
"The index was except limits. He was have to be negative and must be lower than the size of the collection.
Name of the parameter: index"
This is the statement:
SELECT CDEAEMETTRE.NUM_EMETTRE, CDEAEMETTRE.CODE_PORTEFEUILLE, CDEAEMETTRE.CODE_RAYON,
CDEAEMETTRE.GCD_FABRICANT, CDEAEMETTRE.NOM_FOURNISSEUR, CDEAEMETTRE.QTE_ACOMMANDER,
CDEAEMETTRE.REM_BASE, CDEAEMETTRE.REM_EXCEPTION, CDEAEMETTRE.PRIX_ACHAT_HT, CDEAEMETTRE.NOM_OPERATION,
CDEAEMETTRE.STATUT_CDE, STOCK.STOCK_RAYON, PRODUIT.LIB_PRODUIT, PRODUIT.NOM_AUTEUR,
PRODUIT.NOM_EDITEUR, PRODUIT.NOM_COLLECTION, FOURNISSEUR.TYPE_TRANSMISSION, STOCK_GROUPE.stock
FROM STOCK INNER JOIN
PRODUIT ON STOCK.GCD_FABRICANT = PRODUIT.GCD_FABRICANT INNER JOIN
CDEAEMETTRE ON STOCK.CODE_RAYON = CDEAEMETTRE.CODE_RAYON AND
STOCK.GCD_FABRICANT = CDEAEMETTRE.GCD_FABRICANT INNER JOIN
FOURNISSEUR ON CDEAEMETTRE.NOM_FOURNISSEUR = FOURNISSEUR.NOM_FOURNISSEUR INNER JOIN
STOCK_GROUPE ON STOCK.GCD_FABRICANT = STOCK_GROUPE.GCD_FABRICANT_NEUF
CDEAEMETTRE.CODE_RAYON IN
#listeRayon[]#
CDEAEMETTRE.NOM_FOURNISSEUR = #nomFournisseur#
CDEAEMETTRE.CODE_PORTEFEUILLE = #codePorteFeuille#
CDEAEMETTRE.NUM_EMETTRE = #Num#
Doe's anyone has an idea? does the hashtable is limited to 3 items in ibatis.net?
Regards
View this message in context:
Error with dynamic sql and hastable
Sent from the
iBATIS - User - Cs forum at Nabble.com.