Skip to main content
OCLC Support

Search

Find the syntax, use, parameters, return values, and an example for the Search macro command in Connexion client.
Syntax nNumRecords = CS.Search (sDatabase, sSearchTerm)
Use to Search an online database using a search string.

Same as using the following menu commands:
  • Cataloging > Search > WorldCat
  • Cataloging > Search > Online Save File
  • Cataloging > Search > Online Constant Data
  • Cataloging > Search > Local Save File
  • Cataloging > Search > Local Constant Data
  • Authorities > Search > LC Names and Subjects
  • Authorities > Search > Online Save File
  • Authorities > Search > Online Constant Data
  • Authorities > Search > Local Save File
  • Authorities > Search > Local Constant Data
Parameters
  • nNumRecords represents the return value: the number of records found.
  • For sDatabase, enter one of the following database identifiers, enclosed in quotation marks (“):
    • WC (WorldCat)
    • BS (online bibliographic save file)
    • BD (online bibliographic constant data)
    • BL (local bibliographic save file)
    • BC (local bibliographic constant data)
    • BR (online bibliographic review records)
    • AF (Authority File)
    • AS (online authority save file)
    • AD (online authority constant data)
    • AL (local authority save file)
    • AC (local authority constant data)
    • AR (online authority review records)
       Note: If the database parameter is empty or the database identifier is not supported, the search defaults to WorldCat.
  • For sSearchTerm enter a search string (in upper- or lowercase) that is valid for the database you want to search. Enclose in quotation marks (“).
     Note: Whole phrase WorldCat searches require that the phrase be enclosed in quotation marks. For these searches, enclose the phrase in a double set of quotation marks (""search phrase"").

    Retrieve all records from save file or constant data: To retrieve all records from an online save file or from online constant data, specify the database identifier and leave the search string empty.

    Example: CS.Search "BS", "" (retrieves all records in the online bibliographic save file)
Return values Number of records found (nNumRecords)
Example Sub Main()
     Dim CS As Object
     Set CS = GetObject(,“Connex.Client”)
     If CS.IsOnline = False Then
          CS.Logon ““, ““, ““
     End If
     CS.Search “WC”, “#1”
     nNumRecords = CS.Search(“WC”, “gon,wi,th,w”)
     MsgBox (nNumRecords) & “ records were found for Gone with the Wind”
End Sub
What this example does
  • Logs on to Connexion if not already logged on, using the default authorization and password you selected in Tools > Options > Authorizations tab.
  • Searches WorldCat for record 1.
  • Searches WorldCat's derived-search title index for Gone with the Wind, and returns the number of records retrieved (X) in the message: [X] number of records were found for Gone with the Wind.