|
Seeks a Rate card by its rate. |
|
|
VARIANT_BOOL SeekByRate ( enum eSeekMode eSeekMode, BSTR bsCurrencyCodeRef, BSTR bsCurrencyCode, DATE dFromDate ) |
|
|
Key information | | This method uses key number 1 (See SwapKey). | | This is a unique key. |
| | Key segment information | Segment Name | Type | Order | Collation | pCurrencyCodeRef | BSTR | Ascending | Case insensitive | pCurrencyCode | BSTR | Ascending | Case insensitive | pFromDate | DATE (date) | Ascending | - |
| | Parameters | eSeekMode | [in] A value of the 'eSeekMode' enumeration. | bsCurrencyCodeRef | [in] The reference currency code of the rate card you want to seek. | bsCurrencyCode | [in] The currency code of the rate card you want to seek. | dFromDate | [in] The date from which the rate card you want to seek is valid. | | Return value |
True if the record with the given properties was found, otherwise false. |
|
See Also |
|
|
|
Samples |
|
|
C++ |
|
// Seek all exchange rates for 'EUR'/'USD' starting from 01/01/2024
CString strCurCodRef = "EUR", strCurCod = "USD";
COleDateTime odtFromDate;
odtFromDate.SetDate (2024, 1, 1);
pRate->SeekByRate (smGreaterOrEqual, (LPCSTR)strCurCodRef, (LPCSTR)strCurCod, odtFromDate);
while (pRate->GetDBStatus () == 0 && (CString)pRate->pCurrencyCodeRef == strCurCodRef && (CString)pRate->pCurrencyCode == strCurCod && (DATE)pRate->pFromDate >= odtFromDate)
{
// Process record data
pRate->GetNext ();
}
|
|
|
C# |
|
// Seek all exchange rates for 'EUR'/'USD' starting from 01/01/2024
string strCurCodRef = "EUR", strCurCod = "USD";
DateTime dtFromDate = new DateTime (2024, 1, 1);
oRate.SeekByRate (eSeekMode.smGreaterOrEqual, strCurCodRef, strCurCod, dtFromDate);
while (oRate.GetDBStatus () == 0 && oRate.pCurrencyCodeRef.ToString () == strCurCodRef && oRate.pCurrencyCode.ToString () == strCurCod && (DateTime)oRate.pFromDate >= dtFromDate)
{
// Process record data
oRate.GetNext ();
}
|
|
|
VBS |
|
' Seek all exchange rates for 'EUR'/'USD' starting from 01/01/2024
Dim strCurCodRef, strCurCod
Dim dtFromDate
strCurCodRef = "EUR"
strCurCod = "USD"
dtFromDate = #1/1/2024#
Call oRate.SeekByRate(smGreaterOrEqual, strCurCodRef, strCurCod, dtFromDate)
While oRate.GetDBStatus() = 0 And oRate.pCurrencyCodeRef = strCurCodRef And oRate.pCurrencyCode = strCurCod And oRate.pFromDate >= dtFromDate
' Process record data
Call oRate.GetNext()
Wend
|
|
|
VB.NET |
|
' Seek all exchange rates for 'EUR'/'USD' starting from 01/01/2024
Dim strCurCodRef, strCurCod As String
Dim dtFromDate As DateTime
strCurCodRef = "EUR"
strCurCod = "USD"
dtFromDate = #1/1/2024#
oRate.SeekByRate(eSeekMode.smGreaterOrEqual, strCurCodRef, strCurCod, dtFromDate)
While oRate.GetDBStatus() = 0 And oRate.pCurrencyCodeRef = strCurCodRef And oRate.pCurrencyCode = strCurCod And oRate.pFromDate >= dtFromDate
' Process record data
oRate.GetNext()
End While
|
|