当前位置: 首页>>代码示例>>C#>>正文


C# ResultSet.getInt方法代码示例

本文整理汇总了C#中ResultSet.getInt方法的典型用法代码示例。如果您正苦于以下问题:C# ResultSet.getInt方法的具体用法?C# ResultSet.getInt怎么用?C# ResultSet.getInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ResultSet的用法示例。


在下文中一共展示了ResultSet.getInt方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SetParameterIsNullable

		internal void SetParameterIsNullable(ResultSet res)
		{
			IsNullable = (res.getInt("NULLABLE") == 1);
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:4,代码来源:AbstractDBParameter.cs

示例2: FetchInternal

		protected override  void FetchInternal(ResultSet rs, int columnIndex)
		{
			_i = rs.getInt(columnIndex);
		}
开发者ID:runefs,项目名称:Marvin,代码行数:4,代码来源:ReaderCache.cs

示例3: SetParameterSize

		internal void SetParameterSize(ResultSet res)
		{
			Size = res.getInt("LENGTH");
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:4,代码来源:AbstractDBParameter.cs

示例4: SetParameterPrecisionAndScale

		internal void SetParameterPrecisionAndScale(ResultSet res)
		{
			int jdbcType = res.getInt("DATA_TYPE");
			if(jdbcType == java.sql.Types.DECIMAL || jdbcType == java.sql.Types.NUMERIC) {
				Precision = (byte)res.getInt("PRECISION");
				Scale = (byte)res.getInt("SCALE");
			}
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:8,代码来源:AbstractDBParameter.cs

示例5: getValue4Type

		/// <summary>
		/// 在rs中获取column字段的typeClass型的值
		/// </summary>
		/// <param name="rs"> </param>
		/// <param name="column"> </param>
		/// <param name="paramClass">
		/// 
		/// @return
		/// </param>
		/// <exception cref="SQLException"> </exception>
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public static Object getValue4Type(java.sql.ResultSet rs, String column, Class typeClass) throws java.sql.SQLException
		public static object getValue4Type(ResultSet rs, string column, Type typeClass)
		{

			if (typeClass.IsSubclassOf(typeof(ICollection)))
			{
				return null;
			}

			try
			{
				rs.findColumn(column);
			}
			catch (Exception e)
			{
				Console.WriteLine(e.ToString());
				Console.Write(e.StackTrace);
				return null;
			}

			if (typeClass.Equals(typeof(Integer)) || typeClass.Equals(Integer.TYPE))
			{
				return rs.getInt(column);
			}

			if (typeClass.Equals(typeof(Long)) || typeClass.Equals(Long.TYPE))
			{
				return rs.getLong(column);
			}

			if (typeClass.Equals(typeof(Boolean)) || typeClass.Equals(Boolean.TYPE))
			{
				return rs.getBoolean(column);
			}

			if (typeClass.Equals(typeof(Float)) || typeClass.Equals(Float.TYPE))
			{
				return rs.getFloat(column);
			}

			if (typeClass.Equals(typeof(Double)) || typeClass.Equals(Double.TYPE))
			{
				return rs.getDouble(column);
			}

			if (typeClass.Equals(typeof(Byte)) || typeClass.Equals(Byte.TYPE))
			{
				return rs.getByte(column);
			}

			if (typeClass.Equals(typeof(string)))
			{
				return rs.getString(column);
			}

			if (typeClass.IsSubclassOf(typeof(DateTime)))
			{
				return rs.getTimestamp(column);
			}

			if (typeClass.IsSubclassOf(typeof(java.sql.Date)))
			{
				return rs.getDate(column);
			}

			return rs.getObject(column);
		}
开发者ID:yuzukwok,项目名称:disconf.net,代码行数:78,代码来源:MapperUtils.cs

示例6: SetParameterDbType

		protected sealed override void SetParameterDbType(ResultSet res) {
			int jdbcType = res.getInt("DATA_TYPE");			
			// FIXME : is that correct?
			if (jdbcType == Types.OTHER) {
				string typeName = res.getString("TYPE_NAME");
				if (String.Compare("REF CURSOR", typeName, true, CultureInfo.InvariantCulture) == 0) {
					jdbcType = (int)JavaSqlTypes.CURSOR;
				}
				else if (String.Compare("BLOB",typeName,true, CultureInfo.InvariantCulture) == 0) {
					jdbcType = (int)JavaSqlTypes.BLOB;
				}
				else if (String.Compare("CLOB",typeName,true, CultureInfo.InvariantCulture) == 0) {
					jdbcType = (int)JavaSqlTypes.CLOB;
				}
				else if(String.Compare("FLOAT",typeName,true, CultureInfo.InvariantCulture) == 0) {
					jdbcType = (int)JavaSqlTypes.FLOAT;
				}
				else if(String.Compare("NVARCHAR2",typeName,true, CultureInfo.InvariantCulture) == 0) {
					jdbcType = (int)JavaSqlTypes.VARCHAR;
				}
				else if(String.Compare("NCHAR",typeName,true, CultureInfo.InvariantCulture) == 0) {
					jdbcType = (int)JavaSqlTypes.VARCHAR;
				}
			}
			OracleType = OracleConvert.JdbcTypeToOracleType(jdbcType);
			JdbcType = jdbcType;
		}
开发者ID:runefs,项目名称:Marvin,代码行数:27,代码来源:OracleParameter.cs

示例7: SetParameterDbType

		protected internal sealed override void SetParameterDbType(ResultSet res)
		{
			int dataType = res.getInt("DATA_TYPE");
			SqlDbType = SqlConvert.JdbcTypeToSqlDbType(dataType);
			JdbcType = dataType;
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:6,代码来源:SqlParameter.cs


注:本文中的ResultSet.getInt方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。