public override string GetCommand(Column column, string parameterName, System.Data.ParameterDirection parameterDirection, DataRowVersion dataRowVersion, bool isNullable) { SqlDbType sqlDbType = (SqlDbType)Enum.Parse(typeof(SqlDbType), column.OriginalSQLType); return(string.Format("System.Data.SqlClient.SqlParameter(\"{0}\", System.Data.SqlDbType.{1}, {2}, System.Data.ParameterDirection.{3}, {4}, (System.Byte)({5}), (System.Byte)({6}), \"{7}\", System.Data.DataRowVersion.{8}, null)", parameterName, /*The name of the parameter*/ sqlDbType.ToString(), /*One of the OleDbType values*/ column.Length.ToString(), /*The length of the parameter*/ parameterDirection.ToString(), /*One of the ParameterDirection values*/ isNullable.ToString(), column.Precision.ToString(), /*The total number of digits to the left and right of the decimal point to which Value is resolved*/ column.Scale.ToString(), /*The total number of decimal places to which Value is resolved*/ column.Name, /*The name of the source column*/ dataRowVersion.ToString() )); }
/// <summary> /// ToString。 /// </summary> /// <returns></returns> public override string ToString() { return("Name:" + _Name + "; Description:" + _Description + "; Direction:" + _Direction.ToString() + "; TypeName:" + _DbType + "; Length:" + _Length.ToString() + " ;Overcast:" + _Overcast.ToString()); }