Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagesql
SELECT STRING(FirstName, ' ', MiddleName) AS CompleteName, LastName FROM Users
WHERE CompleteName LIKE '%' + ? + '%'

Beispiel-XML-Konfiguration

Code Block
languagexml
<SqlDataProvider DisplayName="Datenbank">
  <SearchParameters>
    <Text Id="Name" Label="Name" />
  </SearchParameters>
  <Options>
    <ConnectionString>Data Source=localhost;Initial Catalog=Customers;User Id={user};Password={pwd};</ConnectionString>
    <ConnectionProvider>System.Data.SqlClient</ConnectionProvider>
    <Query>
      SELECT * FROM Customers WHERE Name Like '%' + @Name + '%'
    </Query>  
  </Option>
  <Mapping>
    <Map Source="Name" Target="CompanyName" />
    <Map Source="Street" Target="Street" />
    <Map Source="Zip" Target="PostalCode" />
    <Map Source="City" Target="City" />
    <Map SourceValue="CH" Target="Country" />
  </Mapping>
</SqlDataProvider>