@@ -184,80 +184,91 @@ public void setParameters(int cursor,
184184 parmsValues [ idxParmCollection - 1 ] = parms [ idx ] ;
185185 if ( ! valueIsNull )
186186 {
187- switch ( pdef . GxType )
187+ if ( pdef . Return )
188188 {
189- case GXType . Char :
190- case GXType . NChar :
191- case GXType . VarChar :
192- if ( pdef . AddAtt && ! pdef . Preload )
193- {
194- if ( ! string . IsNullOrEmpty ( pdef . Tbl ) && ! string . IsNullOrEmpty ( pdef . Fld ) )
195- stmt . SetParameterMultimedia ( idxParmCollection , ( string ) parms [ idx ] , ( string ) parmsValues [ pdef . ImgIdx ] , pdef . Tbl , pdef . Fld ) ;
196- else
197- stmt . SetParameterMultimedia ( idxParmCollection , ( string ) parms [ idx ] , ( string ) parmsValues [ pdef . ImgIdx ] ) ;
198- }
199- else
200- {
201- if ( pdef . GxType == GXType . VarChar )
189+ stmt . SetParameterRT ( pdef . Name , ( string ) parms [ idx ] ) ;
190+ }
191+ else
192+ {
193+ switch ( pdef . GxType )
194+ {
195+ case GXType . Char :
196+ case GXType . NChar :
197+ case GXType . VarChar :
198+ if ( pdef . AddAtt && ! pdef . Preload )
202199 {
203- if ( pdef . ChkEmpty )
204- stmt . SetParameterVChar ( idxParmCollection , ( string ) parms [ idx ] ) ;
200+ if ( ! string . IsNullOrEmpty ( pdef . Tbl ) && ! string . IsNullOrEmpty ( pdef . Fld ) )
201+ stmt . SetParameterMultimedia ( idxParmCollection , ( string ) parms [ idx ] , ( string ) parmsValues [ pdef . ImgIdx ] , pdef . Tbl , pdef . Fld ) ;
205202 else
206- stmt . SetParameterObj ( idxParmCollection , parms [ idx ] ) ;
203+ stmt . SetParameterMultimedia ( idxParmCollection , ( string ) parms [ idx ] , ( string ) parmsValues [ pdef . ImgIdx ] ) ;
207204 }
208205 else
209206 {
210- if ( pdef . ChkEmpty )
211- stmt . SetParameterChar ( idxParmCollection , ( string ) parms [ idx ] ) ;
207+ if ( pdef . GxType == GXType . VarChar )
208+ {
209+ if ( pdef . ChkEmpty )
210+ stmt . SetParameterVChar ( idxParmCollection , ( string ) parms [ idx ] ) ;
211+ else
212+ stmt . SetParameterObj ( idxParmCollection , parms [ idx ] ) ;
213+ }
212214 else
213- stmt . SetParameter ( idxParmCollection , ( string ) parms [ idx ] ) ;
215+ {
216+ if ( pdef . ChkEmpty )
217+ stmt . SetParameterChar ( idxParmCollection , ( string ) parms [ idx ] ) ;
218+ else
219+ stmt . SetParameter ( idxParmCollection , ( string ) parms [ idx ] ) ;
220+ }
214221 }
215- }
216- break ;
217- case GXType . NVarChar :
218- if ( pdef . ChkEmpty )
219- stmt . SetParameterVChar ( idxParmCollection , ( string ) parms [ idx ] ) ;
220- else
221- stmt . SetParameter ( idxParmCollection , ( string ) parms [ idx ] ) ;
222- break ;
223- case GXType . NClob :
224- case GXType . Clob :
225- case GXType . LongVarChar :
226- if ( pdef . ChkEmpty )
227- stmt . SetParameterLVChar ( idxParmCollection , ( string ) parms [ idx ] ) ;
228- else
229- stmt . SetParameter ( idxParmCollection , ( string ) parms [ idx ] ) ;
230- break ;
231- case GXType . DateAsChar :
232- case GXType . Date :
233- stmt . SetParameter ( idxParmCollection , ( DateTime ) parms [ idx ] ) ;
234- break ;
235- case GXType . DateTime :
236- stmt . SetParameterDatetime ( idxParmCollection , ( DateTime ) parms [ idx ] ) ;
237- break ;
238- case GXType . DateTime2 :
239- stmt . SetParameterDatetime ( idxParmCollection , ( DateTime ) parms [ idx ] , true ) ;
240- break ;
241- case GXType . Blob :
242- stmt . SetParameterBlob ( idxParmCollection , ( string ) parms [ idx ] , pdef . InDB ) ;
243- break ;
244- case GXType . UniqueIdentifier :
245- stmt . SetParameter ( idxParmCollection , ( Guid ) parms [ idx ] ) ;
246- break ;
247- case GXType . Geography :
248- case GXType . Geopoint :
249- case GXType . Geoline :
250- case GXType . Geopolygon :
251- stmt . SetParameter ( idxParmCollection , ( Geospatial ) parms [ idx ] , pdef . GxType ) ;
252- break ;
253- default :
254- stmt . SetParameterObj ( idxParmCollection , parms [ idx ] ) ;
255- break ;
222+ break ;
223+ case GXType . NVarChar :
224+ if ( pdef . ChkEmpty )
225+ stmt . SetParameterVChar ( idxParmCollection , ( string ) parms [ idx ] ) ;
226+ else
227+ stmt . SetParameter ( idxParmCollection , ( string ) parms [ idx ] ) ;
228+ break ;
229+ case GXType . NClob :
230+ case GXType . Clob :
231+ case GXType . LongVarChar :
232+ if ( pdef . ChkEmpty )
233+ stmt . SetParameterLVChar ( idxParmCollection , ( string ) parms [ idx ] ) ;
234+ else
235+ stmt . SetParameter ( idxParmCollection , ( string ) parms [ idx ] ) ;
236+ break ;
237+ case GXType . DateAsChar :
238+ case GXType . Date :
239+ stmt . SetParameter ( idxParmCollection , ( DateTime ) parms [ idx ] ) ;
240+ break ;
241+ case GXType . DateTime :
242+ stmt . SetParameterDatetime ( idxParmCollection , ( DateTime ) parms [ idx ] ) ;
243+ break ;
244+ case GXType . DateTime2 :
245+ stmt . SetParameterDatetime ( idxParmCollection , ( DateTime ) parms [ idx ] , true ) ;
246+ break ;
247+ case GXType . Blob :
248+ stmt . SetParameterBlob ( idxParmCollection , ( string ) parms [ idx ] , pdef . InDB ) ;
249+ break ;
250+ case GXType . UniqueIdentifier :
251+ stmt . SetParameter ( idxParmCollection , ( Guid ) parms [ idx ] ) ;
252+ break ;
253+ case GXType . Geography :
254+ case GXType . Geopoint :
255+ case GXType . Geoline :
256+ case GXType . Geopolygon :
257+ stmt . SetParameter ( idxParmCollection , ( Geospatial ) parms [ idx ] , pdef . GxType ) ;
258+ break ;
259+ default :
260+ stmt . SetParameterObj ( idxParmCollection , parms [ idx ] ) ;
261+ break ;
262+ }
256263 }
257264 }
258265 Increment :
259266 idx += 1 ;
260- idxParmCollection += 1 ;
267+ if ( ! pdef . Return )
268+ {
269+ idxParmCollection += 1 ;
270+ }
271+
261272 }
262273 catch ( InvalidCastException ex )
263274 {
0 commit comments