HomeActive Query Builder - HowTos and TroubleshootingHow-tos for WinForms .NET EditionHow to work with the .NET Edition using DevArt dotConnect (Core Lab ADO.Net providers)?

2.4. How to work with the .NET Edition using DevArt dotConnect (Core Lab ADO.Net providers)?

Using DevArt dotConnect, you should use the Universal metadata provider to work with Active Query Builder .NET Edition. This metadata provider takes any Connection object to get access to your database.

See the code example below:

// Create connection using Devart component
String connectionString = "Data Source=192.168.1.4;Persist Security Info=True;User ID=hr;Password=1";
Devart.Data.Oracle.OracleConnection connection = new Devart.Data.Oracle.OracleConnection(connectionString);

// Create UniversalMetadataProvider
UniversalMetadataProvider mp = new UniversalMetadataProvider();
mp.Connection = connection;

// Set up the QueryBuilder
queryBuilder1.MetadataProvider = mp;
queryBuilder1.SyntaxProvider = new OracleSyntaxProvider();

// Load metadata
queryBuilder1.RefreshMetadata();

This page was: Helpful | Not Helpful