public override DataSet GetUserSecurityByPK(object userPK) { mmDataAccessBase dao = this.GetDataAccessObject(); IDbDataParameter param = dao.CreateParameter("@" + this.UserFKField, userPK); param.DbType = DbType.Int32; return this.GetDataSet(this.GetUserSecurityByPKCmd, param); }In this code I have added a line of code that specifies the DbType on the parameter object (change the setting of DbType to something other than Int32 if your PKs aren't integers).