Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 (Français) » UltraLite - C and C++ Programming » API Reference » Embedded SQL API reference


ULDropDatabase function

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

ul_bool ULDropDatabase ( 
SQLCA * sqlca, 
ul_char * store-parms

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.

  • 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).


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.


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


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

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