DatabaseTableExists

Verifica la presenza della tabella nel database.

bool  DatabaseTableExists(
   int     database,      // handle di database ricevuto in DatabaseOpen
   string  table          // nome tabella
   );

Parametri

database

[in] Handle database ricevuto in DatabaseOpen().

table

[in]  Nome tabella.

Valore di ritorno

Restituisce true se ha esito positivo, altrimenti false. Per ottenere il codice di errore, utilizzare GetLastError(), le possibili risposte sono:

  • ERR_INVALID_PARAMETER (4003)               –  no table name specified (empty string or NULL);
  • ERR_WRONG_STRING_PARAMETER (5040)  – error converting a request into a UTF-8 string;
  • ERR_DATABASE_INTERNAL (5120)              – internal database error;
  • ERR_DATABASE_INVALID_HANDLE (5121)   - invalid database handle;
  • ERR_DATABASE_EXECUTE (5124)               -  request execution error;
  • ERR_DATABASE_NO_MORE_DATA (5126)    - no table exists (not an error, normal completion).

Guarda anche

DatabasePrepare, DatabaseFinalize