Database.Type Property |
Returns the type of database in use. Read-only.
Database.Type
Version |
BarTender 6.00 or later |
Edition |
Automation, Enterprise |
The property can return any of the following BtInputDataFile constants:
btTextFile: The database is a text file. Value = 0.
btODBC: The database is an ODBC data source. Value = 1.
btSAPIdoc: The database is a SAP IDoc file. Value = 2.
btOLEDB: The database is an OLE DB data source. Value = 3.
btSQLServer: The database is a Microsoft SQL Server file. Value = 4.
btAccess: The database is a Microsoft Access file. Value = 5.
btExcel: The database is a Microsoft Excel file. Value = 6.
btInformix: The database is an IBM Informix data source. Value = 7.
btOracle: The database is an Oracle data source. Value = 8.
btAzure: The database is a Microsoft Azure SQL Database file. Value = 9.
btMySQL: The database is a MySQL data source. Value = 10.
btFirebird: The database is a Firebird data source. Value = 11.
btDB2: The database is an IBM DB2 data source. Value = 12.
btPostgreSQL: The database is a PostgreSQL data source. Value = 13.
btXML: The database is an XML file. Value = 14.
btMariaDB: The database is a MariaDB file. Value = 15.
btDataBuilder: The database is a BarTender Data Builder file. Value = 16.
btJSON: The database is a JSON file or JSON text format data source. Value = 17.
'Declare and create a new instance of BarTender
Dim btApp As BarTender.Application
btApp = New BarTender.Application
'Declare a BarTender document variable
Dim btFormat As BarTender.Format
'Declare BarTender database variable
Dim btDb As BarTender.Database
'Set the BarTender application visible
btApp.Visible = True
'Open a BarTender document
btFormat = btApp.Formats.Open("c:\Format1.btw", False, "")
'Select the database
btDb = btFormat.Databases.GetDatabase(1)
'Display the type of database being used
MessageBox.Show(btDb.Type.ToString)
'End the BarTender process
btApp.Quit(BarTender.BtSaveOptions.btDoNotSaveChanges)
// Declare a BarTender application variable
BarTender.Application btApp;
// Declare a BarTender document variable
BarTender.Format btFormat;
// Declare a BarTender database variable
BarTender.Database btDb;
// Create a new instance of BarTender
btApp = new BarTender.Application();
// Set the BarTender application visible
btApp.Visible = true;
// Open a BarTender document
btFormat = btApp.Formats.Open("c:\\Format1.btw", false, "");
// Select the database
btDb = btFormat.Databases.GetDatabase(1);
// Display the type of database being used
MessageBox.Show(btDb.Type.ToString());
// End the BarTender process
btApp.Quit(BarTender.BtSaveOptions.btDoNotSaveChanges);
Related Topics