Wildcards and Brackets

There are about as many wildcard characters as there are databases. NDO takes care that the correct ones are selected depending on the database type.

For example MS SQL Server accepts the character '%'

SELECT * FROM Customers WHERE Name LIKE 'M%';

This query returns all data rows where the data in column name starts with M. MS Access uses * as wildcard character.

The same situation exists with brackets that are used for names with umlauts and spaces:

SELECT * FROM [Office Desk]

This query is valid for Access and SQL Server. For Oracle you have to write:

SELECT * FROM "Office Desk"

The actual characters are generated by NDO provider component. It implements the IProvider interface. There is one implementation in NDO for every supported database type. Each % or * in a string literal is replaced in the provider with the character that is defined as wildcard. NDO also sets the quotings according to the database.