ExportDatabase()

Syntax

ExportDatabase(#Database, Filename$)
Description
Exports the specified file to the user through a download.

Parameters

#File The file to export.
Filename$ The filename to use for the download.

Return value

None.

Example

  ; Create a new empty database in memory
  If OpenDatabase(0) 
  
    ; Add new table in it
    DatabaseUpdate(0, "CREATE TABLE food (name CHAR(50), weight REAL, image BLOB)")
    
    ; Add some records
    DatabaseUpdate(0, "INSERT INTO food (name, weight) VALUES ('apple', '10.5')")
    DatabaseUpdate(0, "INSERT INTO food (name, weight) VALUES ('pear', '5')")
    
    ; Export it as a download
    ExportDatabase(0, "Food.db")
  EndIf

See Also

ExportDatabaseMemory()

Supported OS

All

<- DatabaseUpdate() - Database Index - ExportDatabaseMemory() ->