ULDropDatabase function

Deletes an UltraLite database file and any associated temporary or work files.

Syntax
ul_bool ULDropDatabase ( 
SQLCA * sqlca, 
ul_char * store-parms
);
Parameters

sqlca   A pointer to the SQLCA.

store-parms   A null-terminated connection string containing a semicolon-delimited list of parameter settings, each of the form KEYWORD=value.

Returns
  • ul_true   The database file was successfully deleted.

  • ul_false   The database file could not be deleted. A detailed error message is defined by the sqlcode field in the SQLCA. The usual reason for failure is an incorrect file name or access to the file is denied (perhaps because an application has the file open).

Remarks

Only call this function:

  • when there is no open database connection

  • before calling db_init or after calling db_fini.

On the Palm OS, only call this function:

  • when not connected to the database

  • after calling any ULEnable.

Caution

This function deletes the database file and all data in it. This operation is not recoverable. Therefore, use this function with care.

Example

The following call deletes the UltraLite database file myfile.udb.

if( ULDropDatabase(&sqlca, UL_TEXT("file_name=myfile.udb") ) ){
    // success
};