ODBCDatabase.ConnectionInfo

From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!
Method

ODBCDatabase.ConnectionInfo(Attribute as Integer) As Variant

New in 2019r2

Supported for all project types and targets.

Returns general information about the driver and data source associated with a connection.

Returns a Variant that contains either a String or an Integer, based on the attribute.

Notes

ODBCConstant contains integer values that you can use with this function.

Microsoft provides additional information about the SQLGetInfo ODBC function.

Example

Check if the connected ODBC database supports stored procedures:

Var db As New ODBCDatabase
Try
db.Connect
MessageBox(db.ConnectionInfo(ODBCConstant.SQL_PROCEDURES))
Catch error As DatabaseException
MessageBox("Error: " + error.ErrorMessage)
End Try