What product is your inquiry for?
Different editions may provide different APIs. Knowing to which edition your question is related lets give the right answers and provide the right code samples.
Active Query Builder users: find the version number in the properties of referred AQB assemblies in your project, or check for it in the Start menu under the name of "Version" file shortcut.
Let us know the environment in which your problem could be reproduced: what syntax and metadata providers have you used, what is your database server version, database connection type and driver; project type, OS version, etc.