{
this.name = name;
this.value = value;
+ if (value != null) {
+ this.sizeSet = true;
+ this.size = InferSize (value);
+ }
srcColumn = string.Empty;
SourceVersion = DataRowVersion.Current;
- InferOracleType (value);
+ InferOracleType (value);
}
public OracleParameter (string name, OracleType oracleType)
if (size < 0)
throw new ArgumentException("Size must be not be negative.");
this.size = size;
+ this.sizeSet = true;
this.value = value;
SourceColumnNullMapping = sourceColumnNullMapping;
OracleType = oracleType;
if (size < 0)
throw new ArgumentException("Size must be not be negative.");
this.size = size;
+ this.sizeSet = true;
this.value = value;
this.isNullable = isNullable;
this.precision = precision;
this.value = value;
if (!oracleTypeSet)
InferOracleType (value);
+ if (value != null) {
+ this.size = InferSize ();
+ this.sizeSet = true;
+ }
}
}
private void InferOracleType (object value)
{
+ // Should we throw an exception here?
+ if (value is null)
+ return;
+
Type type = value.GetType ();
string exception = String.Format ("The parameter data type of {0} is invalid.", type.FullName);
switch (type.FullName) {