LEADTOOLS Medical (Leadtools.Medical.DataAccessLayer assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.30
GenerateWhereStatement Method
See Also 
Leadtools.Medical.DataAccessLayer Namespace > SqlProviderUtilities Class : GenerateWhereStatement Method



matchingParams
A collection of Leadtools.Medical.DataAccessLayer.Catalog.CatalogElement array to generate the SQL WHERE statement from.
matchingParams
A collection of Leadtools.Medical.DataAccessLayer.Catalog.CatalogElement array to generate the SQL WHERE statement from.
Generates a SQL WHERE statement using the given matching parameters.

Syntax

Visual Basic (Declaration) 
Public Shared Function GenerateWhereStatement( _
   ByVal matchingParams As Collection(Of CatalogElement()) _
) As String
Visual Basic (Usage)Copy Code
Dim matchingParams As Collection(Of CatalogElement())
Dim value As String
 
value = SqlProviderUtilities.GenerateWhereStatement(matchingParams)
C# 
public static string GenerateWhereStatement( 
   Collection<CatalogElement[]> matchingParams
)
C++/CLI 
public:
static String^ GenerateWhereStatement( 
   Collection<array<CatalogElement^>>^ matchingParams
) 

Parameters

matchingParams
A collection of Leadtools.Medical.DataAccessLayer.Catalog.CatalogElement array to generate the SQL WHERE statement from.

Return Value

A SQL WHERE statement using the given matching parameters.

Remarks

The returned SQL statement is not guaranteed to work with all database engines. However, the statement can be used with Microsoft SQL Server engines.

The method works by combining all of the Leadtools.Medical.DataAccessLayer.Catalog.CatalogElement in each array with an AND operator and inserting an OR operator between each Leadtools.Medical.DataAccessLayer.Catalog.CatalogElement array.

The method will use the Leadtools.Medical.DataAccessLayer.Catalog.CatalogElement.EntityName property as the SQL table name and the Leadtools.Medical.DataAccessLayer.Catalog.CatalogElement.ElementName property as the SQL column name for the SQL statement.

For date-time matching, this method can handle the System.DateTime, Leadtools.Dicom.DicomDateRangeValue, Leadtools.Dicom.DicomTimeRangeValue and Leadtools.Dicom.Common.DataTypes.DateRange data types.

Any other value will be converted to a string where wild card/single character matching could be performed using the MatchAllCharacters and MatchOneCharacter methods.

If the string value contains the MatchingValueSeparator value, the values will be separated with an OR operator.

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7

See Also

Leadtools.Medical.DataAccessLayer requires a Medical toolkit server license and unlock key. For more information, refer to: Imaging Pro/Document/Medical Features