

!AbtIbmCliCSDatabaseConnection privateMethods !

loadInputRow: aRow forQuerySpec: aQuerySpec withValues: aDictionary
	" Load the data from the input dictionary aDictionary into aRow.
	  Same input parameter can appear multiple times in aRow, but
	  only once in aDictionary "

	| varOrder ct index rc |
	ct := aRow type. 
	rc := true.
	varOrder := aQuerySpec hostVariablesInOrder.

	"fill row with params to be used this time"
	( varOrder isEmpty )
		ifTrue: [  "No host variables, so just fill in the parm markers in order."
			aDictionary keysAndValuesDo: [ :hostVarName :value | 
					aRow at: hostVarName put: value]]
		ifFalse: [ "Host variables, may appear more than once each, but only once in aDictionary."
			aDictionary keysAndValuesDo: [ :hostVarName :value| 
					value isLobFileReference ifFalse: [
						index := 1.
						[ rc isAbtError not and: 
							[( index := varOrder indexOf: hostVarName startingAt: index ) ~= 0 ] ]
							whileTrue: [
							rc := 
								aRow 
									at: ( ct fieldAtIndex: index ) name 
									put: value.
								index := index + 1.]]
					].
			aRow setParamLengths.
		].

	^rc! !