GeneratePoolFromODBC

This method removes the previous pool and generates a new one using the ODBC source with the parameters set on the property page.

The method filters the full pool's records, prior to performing the ASE pool search.

Use this functionality with caution. If a Runtime Server or Verifier performs this operation, the possibility of the same pool folder being constantly filtered and altered will impact the performance of the project.

The Runtime Server performing this operation should be single threaded.

Syntax

GeneratePoolFromODBC ()

Sample Code

Note: The files in the pool folder will be reduced as they contain a smaller, filtered ADS pool.
Sub GeneratePoolData (pworkdoc As SCBCdrPROJLib.SCBCdrWorkdoc)
   ; Get a handle for the field and settings
   ; The field in the project file should already be configured for ODBC
   Dim oCustomerASSA As SCBCdrField
   Dim FieldAnalysissettings As ISCBCdrAnalysisSettings
   Dim PoolAnalysisSettings As SCBCdrSupExSettings
   Dim SupplierExtractionEngine As New SCBCdrSupplierExtractionEngine

   Set oCustomerASSA = pworkdoc.Fields("VendorName")
   Project.AllClasses("Invoices").GetFieldAnalysisSettings(oCustomerASSA.Name, "German", FieldAnalysissettings)
   Set PoolAnalysisSettings = Project.AllClasses("Invoices").Fields(oCustomerASSA.Name).AnalysisSetting("German")

   ; Modify the SQL query to set your lookup criteria
   PoolAnalysisSettings.SQLQuery = "SELECT * FROM VendorData WHERE Col002 in ('BOLZ', 'Gutman', 'WorldNet')"

   ; Perform the search
   PoolAnalysisSettings.GeneratePoolFromODBC
   SupplierExtractionEngine.SearchField("BOLZ Company, Gutman Company, Inc, Worldnet", pworkdoc, FieldAnalysissettings, oCustomerASSA.Name)

   ; Check if there is at least 1 result
   If oCustomerASSA.CandidateCount > 0 Then
      ;do something
   End If
End Sub