Hello,
As we are using DB2400Dialect on a iseries 5v4 and 6v1 provider, we
found that the BLOB and CLOB support, is not working, or you need to
specify sql-type in mapping.
To improve this , i've implemented an DB2400V5Dialect that corrects
this behaviour and more improvements on varchar and char sizes also
added a default binary.
Also DB2 for ISeries supports sequences
// ReSharper disable InconsistentNaming
public class DB2400V5Dialect : DB2400Dialect
// ReSharper restore InconsistentNaming
{
#region Public Properties (1)
/// <summary>
/// Gets a value indicating whether [supports sequences].
/// </summary>
/// <value><c>true</c> if [supports sequences]; otherwise,
<c>false</c>.</value>
public override bool SupportsSequences
{
get
{
return true;
}
}
#endregion Public Properties
#region Constructors (1)
/// <summary>
/// Initializes a new instance of the <see
cref="DB2400Dialect"/> class.
/// </summary>
public DB2400V5Dialect()
{
// Length between 1 and 32765 for nullable CHAR
RegisterColumnType(DbType.AnsiStringFixedLength, 32765,
"CHAR($l)");
// Length between 1 and 32739 for nullable VARCHAR
RegisterColumnType(DbType.AnsiString, 32739, "VARCHAR
($l)");
RegisterColumnType(DbType.AnsiString, 2147483647, "CLOB
($l)");
// default binary size 1 mb
RegisterColumnType(DbType.Binary, "BLOB");
RegisterColumnType(DbType.Binary, 2147483647, "BLOB($l)");
RegisterColumnType(DbType.String, 32739, "VARCHAR($l)");
RegisterColumnType(DbType.String, 2147483647, "CLOB($l)");
}
#endregion Constructors
}
Kind regards
Ps: Maybe not really a request for change, but still it could help
others working on ISeries DB2
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---