public void setParameters(int cursor, IFieldSetter stmt, Object[] parms) { short sIdx; switch (cursor) { case 0: sIdx = 0; if ((short)parms[0] == 0) { sIdx = (short)(sIdx + 1); stmt.SetParameter(sIdx, (short)parms[4]); } if ((short)parms[1] == 0) { sIdx = (short)(sIdx + 1); stmt.SetParameter(sIdx, (String)parms[5]); } if ((short)parms[2] == 0) { sIdx = (short)(sIdx + 1); stmt.SetParameter(sIdx, (String)parms[6]); } if ((short)parms[3] == 0) { sIdx = (short)(sIdx + 1); stmt.SetParameter(sIdx, (String)parms[7]); } return; } }
public void setParameters(int cursor, IFieldSetter stmt, Object[] parms) { switch (cursor) { case 0: stmt.SetParameter(1, (long)parms[0]); return; case 1: if ((bool)parms[0]) { stmt.setNull(1, SqlDbType.Decimal); } else { stmt.SetParameter(1, (long)parms[1]); } return; case 2: if ((bool)parms[0]) { stmt.setNull(1, SqlDbType.Decimal); } else { stmt.SetParameter(1, (long)parms[1]); } return; } }
public void setParameters(int cursor, IFieldSetter stmt, Object[] parms) { switch (cursor) { case 0: stmt.SetParameter(1, (long)parms[0]); stmt.SetParameter(2, (String)parms[1]); return; } }
public void setParameters(int cursor, IFieldSetter stmt, Object[] parms) { switch (cursor) { case 0: stmt.SetParameter(1, (DateTime)parms[0]); stmt.SetParameter(2, (decimal)parms[1]); return; } }
public void setParameters(int cursor, IFieldSetter stmt, Object[] parms) { switch (cursor) { case 1: stmt.SetParameter(1, (int)parms[0]); stmt.SetParameter(2, (DateTime)parms[1]); stmt.SetParameter(3, (int)parms[2]); stmt.SetParameter(4, (int)parms[3]); break; } }
public void setParameters(int cursor, IFieldSetter stmt, Object[] parms) { switch (cursor) { case 0: stmt.SetParameter(1, (short)parms[0]); break; case 1: stmt.SetParameter(1, (short)parms[0]); break; } }
public void setParameters(int cursor, IFieldSetter stmt, Object[] parms) { switch (cursor) { case 2: stmt.SetParameter(1, (String)parms[0]); stmt.SetParameter(2, (String)parms[1]); break; case 3: stmt.SetParameter(1, (String)parms[0]); break; } }
public void setParameters(int cursor, IFieldSetter stmt, Object[] parms) { switch (cursor) { case 1: stmt.SetParameter(1, (long)parms[0]); stmt.SetParameter(2, (String)parms[1]); stmt.SetParameterDatetime(3, (DateTime)parms[2]); stmt.SetParameter(4, (String)parms[3]); stmt.SetParameter(5, (DateTime)parms[4]); stmt.SetParameter(6, (String)parms[5]); return; } }
public void setParameters(int cursor, IFieldSetter stmt, Object[] parms) { switch (cursor) { case 0: stmt.SetParameter(1, (String)parms[0]); return; case 1: stmt.SetParameter(1, (String)parms[0]); return; case 2: stmt.SetParameter(1, (String)parms[0]); return; case 3: stmt.SetParameter(1, (String)parms[0]); return; case 4: stmt.SetParameter(1, (String)parms[0]); return; case 5: stmt.SetParameter(1, (String)parms[0]); return; case 6: stmt.SetParameter(1, (String)parms[0]); return; } }
public void setParameters(int cursor, IFieldSetter stmt, Object[] parms) { short sIdx; switch (cursor) { case 0: sIdx = 0; if ((short)parms[0] == 0) { sIdx = (short)(sIdx + 1); stmt.SetParameter(sIdx, (long)parms[8]); } if ((short)parms[1] == 0) { sIdx = (short)(sIdx + 1); stmt.SetParameter(sIdx, (long)parms[9]); } if ((short)parms[2] == 0) { sIdx = (short)(sIdx + 1); stmt.SetParameter(sIdx, (long)parms[10]); } if ((short)parms[3] == 0) { sIdx = (short)(sIdx + 1); stmt.SetParameter(sIdx, (long)parms[11]); } if ((short)parms[4] == 0) { sIdx = (short)(sIdx + 1); stmt.SetParameter(sIdx, (String)parms[12]); } if ((short)parms[5] == 0) { sIdx = (short)(sIdx + 1); stmt.SetParameter(sIdx, (String)parms[13]); } if ((short)parms[6] == 0) { sIdx = (short)(sIdx + 1); stmt.SetParameterDatetime(sIdx, (DateTime)parms[14]); } if ((short)parms[7] == 0) { sIdx = (short)(sIdx + 1); stmt.SetParameterDatetime(sIdx, (DateTime)parms[15]); } return; } }
public void setParameters(int cursor, IFieldSetter stmt, Object[] parms) { switch (cursor) { case 0: stmt.SetParameter(1, (decimal)parms[0]); break; case 1: stmt.SetParameter(1, (decimal)parms[0]); break; case 2: stmt.SetParameter(1, (decimal)parms[0]); break; case 3: stmt.SetParameter(1, (decimal)parms[0]); break; case 4: stmt.SetParameter(1, (decimal)parms[0]); break; case 5: stmt.SetParameter(1, (decimal)parms[0]); break; case 6: stmt.SetParameter(1, (decimal)parms[0]); break; case 7: stmt.SetParameter(1, (decimal)parms[0]); break; } }
public void setParameters(int cursor, IFieldSetter stmt, Object[] parms) { switch (cursor) { case 0: stmt.SetParameter(1, (Guid)parms[0]); stmt.SetParameter(2, (Guid)parms[1]); return; case 1: stmt.SetParameter(1, (Guid)parms[0]); stmt.SetParameter(2, (Guid)parms[1]); return; case 2: stmt.SetParameter(1, (Guid)parms[0]); return; case 3: stmt.SetParameter(1, (Guid)parms[0]); return; case 4: stmt.SetParameter(1, (Guid)parms[0]); stmt.SetParameter(2, (Guid)parms[1]); return; case 5: stmt.SetParameter(1, (Guid)parms[0]); stmt.SetParameter(2, (Guid)parms[1]); return; case 6: stmt.SetParameter(1, (Guid)parms[0]); stmt.SetParameter(2, (Guid)parms[1]); return; case 7: stmt.SetParameter(1, (Guid)parms[0]); stmt.SetParameter(2, (Guid)parms[1]); return; case 8: stmt.SetParameter(1, (Guid)parms[0]); stmt.SetParameter(2, (Guid)parms[1]); return; case 9: stmt.SetParameter(1, (Guid)parms[0]); return; case 10: stmt.SetParameter(1, (Guid)parms[0]); return; } }
public void setParameters(int cursor, IFieldSetter stmt, Object[] parms) { switch (cursor) { case 0: stmt.SetParameter(1, (long)parms[0]); return; case 1: stmt.SetParameter(1, (long)parms[0]); return; case 2: stmt.SetParameter(1, (long)parms[0]); return; case 3: stmt.SetParameter(1, (long)parms[0]); return; case 4: stmt.SetParameter(1, (long)parms[0]); return; case 5: stmt.SetParameter(1, (long)parms[0]); return; case 6: stmt.SetParameter(1, (long)parms[0]); return; case 7: stmt.SetParameter(1, (long)parms[0]); return; case 8: stmt.SetParameter(1, (long)parms[0]); return; case 9: stmt.SetParameter(1, (long)parms[0]); return; case 10: stmt.SetParameter(1, (long)parms[0]); return; case 11: stmt.SetParameter(1, (long)parms[0]); return; case 12: stmt.SetParameter(1, (long)parms[0]); return; case 13: stmt.SetParameter(1, (long)parms[0]); return; case 14: if ((bool)parms[0]) { stmt.setNull(1, SqlDbType.Decimal); } else { stmt.SetParameter(1, (long)parms[1]); } return; case 15: if ((bool)parms[0]) { stmt.setNull(1, SqlDbType.Decimal); } else { stmt.SetParameter(1, (long)parms[1]); } return; case 16: stmt.SetParameter(1, (long)parms[0]); return; case 17: stmt.SetParameter(1, (long)parms[0]); return; case 18: stmt.SetParameter(1, (long)parms[0]); return; case 19: if ((bool)parms[0]) { stmt.setNull(1, SqlDbType.Decimal); } else { stmt.SetParameter(1, (long)parms[1]); } return; case 20: if ((bool)parms[0]) { stmt.setNull(1, SqlDbType.Decimal); } else { stmt.SetParameter(1, (long)parms[1]); } return; case 21: stmt.SetParameter(1, (long)parms[0]); return; case 22: if ((bool)parms[0]) { stmt.setNull(1, SqlDbType.Decimal); } else { stmt.SetParameter(1, (long)parms[1]); } return; case 23: if ((bool)parms[0]) { stmt.setNull(1, SqlDbType.Decimal); } else { stmt.SetParameter(1, (long)parms[1]); } return; case 24: if ((bool)parms[0]) { stmt.setNull(1, SqlDbType.Decimal); } else { stmt.SetParameter(1, (long)parms[1]); } return; case 25: if ((bool)parms[0]) { stmt.setNull(1, SqlDbType.Decimal); } else { stmt.SetParameter(1, (long)parms[1]); } return; case 26: stmt.SetParameter(1, (long)parms[0]); return; case 27: stmt.SetParameter(1, (long)parms[0]); return; case 28: if ((bool)parms[0]) { stmt.setNull(1, SqlDbType.Decimal); } else { stmt.SetParameter(1, (long)parms[1]); } return; } }
public void setParameters(int cursor, IFieldSetter stmt, Object[] parms) { short sIdx; switch (cursor) { case 0: sIdx = 0; if ((short)parms[0] == 0) { sIdx = (short)(sIdx + 1); stmt.SetParameter(sIdx, (DateTime)parms[16]); } if ((short)parms[1] == 0) { sIdx = (short)(sIdx + 1); stmt.SetParameter(sIdx, (DateTime)parms[17]); } if ((short)parms[2] == 0) { sIdx = (short)(sIdx + 1); stmt.SetParameter(sIdx, (String)parms[18]); } if ((short)parms[3] == 0) { sIdx = (short)(sIdx + 1); stmt.SetParameter(sIdx, (String)parms[19]); } if ((short)parms[4] == 0) { sIdx = (short)(sIdx + 1); stmt.SetParameter(sIdx, (String)parms[20]); } if ((short)parms[5] == 0) { sIdx = (short)(sIdx + 1); stmt.SetParameter(sIdx, (String)parms[21]); } if ((short)parms[6] == 0) { sIdx = (short)(sIdx + 1); stmt.SetParameter(sIdx, (String)parms[22]); } if ((short)parms[7] == 0) { sIdx = (short)(sIdx + 1); stmt.SetParameter(sIdx, (String)parms[23]); } if ((short)parms[8] == 0) { sIdx = (short)(sIdx + 1); stmt.SetParameter(sIdx, (short)parms[24]); } if ((short)parms[9] == 0) { sIdx = (short)(sIdx + 1); stmt.SetParameter(sIdx, (short)parms[25]); } if ((short)parms[10] == 0) { sIdx = (short)(sIdx + 1); stmt.SetParameter(sIdx, (String)parms[26]); } if ((short)parms[11] == 0) { sIdx = (short)(sIdx + 1); stmt.SetParameter(sIdx, (String)parms[27]); } if ((short)parms[12] == 0) { sIdx = (short)(sIdx + 1); stmt.SetParameter(sIdx, (decimal)parms[28]); } if ((short)parms[13] == 0) { sIdx = (short)(sIdx + 1); stmt.SetParameter(sIdx, (decimal)parms[29]); } if ((short)parms[14] == 0) { sIdx = (short)(sIdx + 1); stmt.SetParameter(sIdx, (DateTime)parms[30]); } if ((short)parms[15] == 0) { sIdx = (short)(sIdx + 1); stmt.SetParameter(sIdx, (DateTime)parms[31]); } return; } }
public void setParameters(int cursor, IFieldSetter stmt, Object[] parms) { List <ParDef> parmdefs = stmt.ParameterDefinition; int idx = 0; int idxParmCollection = 1; object[] parmsValues = new object[parmdefs.Count]; foreach (ParDef pdef in parmdefs) { bool valueIsNull = false; try { if (pdef.InOut) { stmt.RegisterInOutParameter(idxParmCollection, null); } else if (pdef.Out) { stmt.RegisterOutParameter(idxParmCollection, null); continue; } if (pdef.Nullable) { valueIsNull = (bool)parms[idx]; if (valueIsNull) { stmt.setNull(idxParmCollection, DBNull.Value); } idx += 1; } parmsValues[idxParmCollection - 1] = parms[idx]; if (!valueIsNull) { switch (pdef.GxType) { case GXType.Char: case GXType.NChar: case GXType.VarChar: if (pdef.AddAtt && !pdef.Preload) { if (!string.IsNullOrEmpty(pdef.Tbl) && !string.IsNullOrEmpty(pdef.Fld)) { stmt.SetParameterMultimedia(idxParmCollection, (string)parms[idx], (string)parmsValues[pdef.ImgIdx], pdef.Tbl, pdef.Fld); } else { stmt.SetParameterMultimedia(idxParmCollection, (string)parms[idx], (string)parmsValues[pdef.ImgIdx]); } } else { if (pdef.GxType == GXType.VarChar) { if (pdef.ChkEmpty) { stmt.SetParameterVChar(idxParmCollection, (string)parms[idx]); } else { stmt.SetParameterObj(idxParmCollection, parms[idx]); } } else { if (pdef.ChkEmpty) { stmt.SetParameterChar(idxParmCollection, (string)parms[idx]); } else { stmt.SetParameter(idxParmCollection, (string)parms[idx]); } } } break; case GXType.NVarChar: if (pdef.ChkEmpty) { stmt.SetParameterVChar(idxParmCollection, (string)parms[idx]); } else { stmt.SetParameter(idxParmCollection, (string)parms[idx]); } break; case GXType.NClob: case GXType.Clob: case GXType.LongVarChar: if (pdef.ChkEmpty) { stmt.SetParameterLVChar(idxParmCollection, (string)parms[idx]); } else { stmt.SetParameter(idxParmCollection, (string)parms[idx]); } break; case GXType.Date: stmt.SetParameter(idxParmCollection, (DateTime)parms[idx]); break; case GXType.DateAsChar: case GXType.DateTime: stmt.SetParameterDatetime(idxParmCollection, (DateTime)parms[idx]); break; case GXType.DateTime2: stmt.SetParameterDatetime(idxParmCollection, (DateTime)parms[idx], true); break; case GXType.Blob: stmt.SetParameterBlob(idxParmCollection, (string)parms[idx], pdef.InDB); break; case GXType.UniqueIdentifier: stmt.SetParameter(idxParmCollection, (Guid)parms[idx]); break; case GXType.Geography: case GXType.Geopoint: case GXType.Geoline: case GXType.Geopolygon: stmt.SetParameter(idxParmCollection, (Geospatial)parms[idx], pdef.GxType); break; default: stmt.SetParameterObj(idxParmCollection, parms[idx]); break; } } idx += 1; idxParmCollection += 1; } catch (InvalidCastException ex) { string msg = this.GetType() + ".setParameters error parameterName:" + pdef.Name + " parameterType:" + pdef.GxType; GXLogging.Error(log, ex, msg + " value:" + parms[idx]); throw new Exception("Invalid parameter conversion at " + msg, ex); } } }
public void setParameters(int cursor, IFieldSetter stmt, Object[] parms) { switch (cursor) { case 1: stmt.SetParameter(1, (long)parms[0]); if ((bool)parms[1]) { stmt.setNull(2, SqlDbType.VarChar); } else { stmt.SetParameter(2, (String)parms[2]); } if ((bool)parms[3]) { stmt.setNull(3, SqlDbType.VarChar); } else { stmt.SetParameter(3, (String)parms[4]); } if ((bool)parms[5]) { stmt.setNull(4, SqlDbType.DateTime); } else { stmt.SetParameter(4, (DateTime)parms[6]); } if ((bool)parms[7]) { stmt.setNull(5, SqlDbType.SmallInt); } else { stmt.SetParameter(5, (short)parms[8]); } if ((bool)parms[9]) { stmt.setNull(6, SqlDbType.Bit); } else { stmt.SetParameter(6, (bool)parms[10]); } if ((bool)parms[11]) { stmt.setNull(7, SqlDbType.Bit); } else { stmt.SetParameter(7, (bool)parms[12]); } if ((bool)parms[13]) { stmt.setNull(8, SqlDbType.Bit); } else { stmt.SetParameter(8, (bool)parms[14]); } if ((bool)parms[15]) { stmt.setNull(9, SqlDbType.VarChar); } else { stmt.SetParameter(9, (String)parms[16]); } if ((bool)parms[17]) { stmt.setNull(10, SqlDbType.Decimal); } else { stmt.SetParameter(10, (long)parms[18]); } if ((bool)parms[19]) { stmt.setNull(11, SqlDbType.VarChar); } else { stmt.SetParameter(11, (String)parms[20]); } return; } }