本文整理汇总了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);
}
示例2: FetchInternal
protected override void FetchInternal(ResultSet rs, int columnIndex)
{
_i = rs.getInt(columnIndex);
}
示例3: SetParameterSize
internal void SetParameterSize(ResultSet res)
{
Size = res.getInt("LENGTH");
}
示例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");
}
}
示例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);
}
示例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;
}
示例7: SetParameterDbType
protected internal sealed override void SetParameterDbType(ResultSet res)
{
int dataType = res.getInt("DATA_TYPE");
SqlDbType = SqlConvert.JdbcTypeToSqlDbType(dataType);
JdbcType = dataType;
}