BWISearch – Search

BWISearch (h, start, num)

Use this to search the data for up to 3 strings set using BWISetString with item BWI_V_PAR1[2 or 3]. For a match, all the strings must be found within the record. Therefore, typically the more strings you set the fewer matches are returned.

For some countries, you can set the flag BWG_G_INSTITUTION_CHECK to specify whether you want to search institution or branch data.

If you have the cross-border licence, you can set the flag BWG_G_BIC_CHECK to search the SEPA and SWIFT data.

By default, this attempts to find a maximum of 100 matches. Use BWISetValue with item BWI_V_MAX_SEARCH to reduce the maximum number of matches returned.

Use BWINext with item BWI_N_SEARCH to move to the first matching result.

Input parameters

h You create this using BWICreateHandle. Use this handle to search for:
  • the country set using BWISetValue with item BWI_V_COUNTRY_CHECK
  • input flags set using BWISetValue with item BWI_V_INFLAG
  • search parameters set using BWISetString with item BWI_V_PAR1 to BWI_V_PAR3.
start Long integer. Use this to specify where the search starts:
  • 1 to start from the beginning of the branch data file
  • 0 to continue from where the last search ended.

Output parameter

num Long integer. Returns the number of records matched by the search.
If 0 there are no more matches and the entire database has been searched.