Error getting tags :
error 404Error getting tags :
error 404 revDatabaseType | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Version
revDatabaseType
Basics
Expander triangle
Type
Function
Syntax

revDatabaseType(databaseID)

Introduced
1.1.1
Changed
2.0
Environment
Desktop, Web and Server
Platform Support
MacOS,Mac OS X,Windows,Linux
Security
Disk,Network
Summary
Returns the type of database associated with a connection.
Examples

if revDatabaseType(1) is not "odbc" then
checkLicense
end if
if revDatabaseType(the currentDB of group "Display") is "Valentina" then
sendValQuery
else
sendGenericQuery
end if

Additional Comments
Expander triangle

Use the revDatabaseType function to send different queries or perform different operations depending on what kind of database is being used.

Parameters:

The databaseID is the number returned by the revOpenDatabase function when the database was opened.

Value:

The revDatabaseType function returns a string containing up to two items (separated by a comma)

Item 1 of the string is one of the following values: "MySQL", "ODBC", "Oracle", "PostgresSQL", "SQLite", "Valentina".

Item 2 of the string is empty for all database types except ODBC. If the database type is ODBC then item 2 of the string contains the name of the database system being accessed by the ODBC driver.

Comments:

You can use the revDatabaseType function to distinguish between different database types. For example, you may need to frame a SQL query differently depending on what type of database you are communicating with.

Important! The revDatabaseTypefunction is part of the Database library. To ensure that the function works in a standalone application, you must include this custom library when you create your standalone. In the Inclusions section of the General screen of the Standalone Application Settings window, make sure the "Database Support" checkbox is checked and the database drivers you are using are selected in the list of database drivers.

Changes to Revolution:

The revDatabaseType synonym was added in version 2.0.

User Comments
Expander triangle