HomeActive Query Builder - IntroductionCommon QuestionsDatabase server autodetection (SQL syntax)

3.8. Database server autodetection (SQL syntax)

Use the AutoSyntaxProvider to detect database syntax automatically.

By setting this object as syntax provider for a query builder object, database syntax will be detected on retrieving metadata from your database (using RefreshMetadata method).

You do not have to change syntax provider after detection. AutoSyntaxProvider will act as detected syntax provider. You may know the result of database server detection by examining the DetectedSyntaxProvider property.

To detect database syntax without metadata retrieval, use the following code:

autoSyntaxProvider1.DetectSyntaxProvider(queryBuilder1.SQLContext);

 

Auto syntax provider detects database server using live database connection, by sending server-specific queries and analyzing result. It can not detect database syntax by analyzing arbitrary SQL queries.

 

For the ActiveX Edition, use the "SQLSyntax = xsAuto" setting and examine the UsedSQLSyntax property.

This page was: Helpful | Not Helpful