// public DatabaseHandler(string p_connectionString) { if (!string.IsNullOrEmpty(p_connectionString.Trim())) connectionString = p_connectionString; } #endregion #region AddParameter Methods private void AddParameter(SqlCommand command, string parameterName, SqlDbType dbType, int size, ParameterDirection direction, byte precision, byte scale, string sourceColumn, System.Data.DataRowVersion sourceVersion, object value) { SqlParameter p = new SqlParameter(parameterName, dbType, size, direction, precision, scale, sourceColumn, sourceVersion, true, value, null, null, null); command.Parameters.Add(p); }
private SqlParameter CreateSqlParameter(string parameterName, SqlDbType dataType, int size, string srcColumn, System.Data.ParameterDirection direction, System.Data.DataRowVersion srcVersion) { SqlParameter myParameter = new SqlParameter(); myParameter.ParameterName = parameterName; myParameter.SqlDbType = dataType; myParameter.Size = size; myParameter.SourceColumn = srcColumn; myParameter.Direction = direction; myParameter.SourceVersion = srcVersion; return(myParameter); }
/// <summary> /// See <see cref="IProvider">IProvider interface</see>. /// </summary> public abstract IDataParameter AddParameter(System.Data.IDbCommand command, string parameterName, object dbType, int size, System.Data.ParameterDirection dir, bool isNullable, byte precision, byte scale, string srcColumn, System.Data.DataRowVersion srcVersion, object value);
public long GetIDFromDataRow(System.Data.DataRow dr, System.Data.DataRowVersion rowState) { return(Convert.ToInt64(dr["MPAItemID", rowState].ToString())); }