UseODBCDatabase()

语法

Result = UseODBCDatabase()
概要
Initialize the ODBC database environment for future use. It attempts to load the ODBC driver and allocate the required resources.

参数

无.

返回值

If Result is 0, then the ODBC driver is not available or is too old (ODBC 3.0 or higher is needed) and the Database functions should not be used.

Remarks

After calling UseODBCDatabase(), a database has to be opened using OpenDatabase() using a registered ODBC database name as database or OpenDatabaseRequester() before using any other Database functions.

It is possible to obtain a list of available drivers by calling the function ExamineDatabaseDrivers().

示例

  UseODBCDatabase()

  If OpenDatabase(0, "MySQL-ODBC", "mysql", "mysql")
    Debug "Connected to MySQL"
  Else
    Debug "Connection failed: "+DatabaseError()
  EndIf

参阅

OpenDatabase(), UseSQLiteDatabase(), UsePostgreSQLDatabase()

已支持操作系统

所有

<- SetDatabaseBlob() - Database Index - UsePostgreSQLDatabase() ->