Auction.AuctionAddItem

Ee823353.c++_on(en-US,CS.10).gifEe823353.vb_off(en-US,CS.10).gif

Use this method to add a new item to the auction system.

Definition

Function AuctionAddItem(szSKU As String,cyReservePrice As Currency,nAvailable As Long,cyBidIncrement As Currency,nAuctionType As Long,cyMinimumBid As Currency,fSealedBid As Boolean,fSealedInventory As Boolean,fActive As Boolean,dtStartDate As Date,dtEndDate As Date,nAutoCloseSeconds As Long,objErrorList As Object) As Long

Parameters

szSKU

A String that contains the unique ID for the item.

cyReservePrice

A Currency that contains the minimum price that the seller is willing to sell the item for. The reserve price must be greater than the minimum bid.

nAvailable

A Long that contains the number of items for sale.

cyBidIncrement

A Currency that contains the amount a bid must be raised in order to bid on the item.

nAuctionType

A Long that contains the auction type. For more information, see the table in the Remarks section.

cyMinimumBid

A Currency that contains the minimum opening bid.

fSealedBid

A Boolean that indicates whether to check a bid against the minimum bid. A value of True skips the minimum bid check.

fSealedInventory

A Boolean that indicates whether to check the wanted number of items in a bid against the number of items available for sale. A value of False indicates to check the items. A value of True skips the check (the fTakeLess parameter in the bid is ignored).

fActive

A Boolean that indicates whether the auction is active. A value of True indicates an active auction. A value of False suspends bidding on the auction.

dtStartDate

A Date that determines when bids will be accepted on the item.

dtEndDate

A Date that determines when the auction is closed and the items can be purchased.

nAutoCloseSeconds

A Long that indicates the number of seconds to wait after the last bid is received to close the auction. This can close an auction before the end date. A value of zero (0) indicates to ignore the time of the last bid and close the auction on the end date.

objErrorList

An IDispatch interface that contains the error list.

Return Values

If this method completes successfully, it returns a Long that contains the number of error strings written to the objErrorList object*.*

Error Values

This method sets the Number property of the global Err object to S_OK (&H00000000) to indicate success and to standard COM error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. Additional information may be available using the global Err object. In particular, the Description property may contain a text description of the error.

Remarks

The auction type controls the method used to determine the winning bidder and the amount the winning bidder must pay. The following table describes the available auction types.

Auction Type Value Description Example
Winning Price 0 Winning bidders receive the item they bid on for the amount bid. If there is more than one item, winning bidders receive the number requested at the amount they bid. Two items are at auction. Bidder A bids $10.00, Bidder B bids $5.00, and Bidder C bids $3.00, and each bidder requests one item.

Bidder A receives one item for $10.00 and Bidder B receives one item for $5.00. However, if Bidder A requested two items at $10.00 each, both items would be awarded to Bidder A.

Clear Price 1 Winning bidders receive the item they bid on for the lowest winning bid. Same conditions as Winning Price auction type example.

Bidder A and Bidder B each receive one item for $5.00.

Second Price 2 Winning bidders pay the lowest of the following:

The highest losing bid plus the bid increment, the lowest winning bid, or the reserve price, assuming the number of bids above the reserve price is less than the number of available items.

Same conditions as Winning Price auction type example with a bid increment of $0.50.

Bidder A and Bidder B each receive one item for $3.50.

For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.

Example

'lNumErrStrings is a Long
'dtStartDate is a Date
'dtEndDate is a Date
'oErrors is a list object

lNumErrStrings = oAuction.AuctionAddItem("123456", 2.50, 2, 0.50, 1, 1.50, False, False, True, dtStartDate, dtEndDate, 0, oErrors)

See Also

Auction Object


All rights reserved.