Help / WLanguage / Managing databases / Big Data / Managing Mongo files
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
Deletes a file identified by its name from a MongoDB file system.
Remark: To delete a file identified by its identifier, use MongoGridFSDeleteFileByID.
// Delete an image file
MongoGridFSDeleteFile(cnt.Database, "productpng")
// Delete the file found in the table column
MongoGridFSDeleteFile(gclGridFS, TABLE_GridFS.COL_Name)
ToastDisplay("Deletion successfully performed.")
<Result> = MongoGridFSDeleteFile(<File system> , <File name>)
<Result>: Boolean
  • True if the operation was performed,
  • False if a problem occurs. ErrorInfo is used to identify the error.
<File system>: mongoGridFS or mongoDatabase variable
File system of the MongoDB database to use. Corresponds to:
  • the name of the mongoGridFS variable that corresponds to the Mongo file system.
  • the name of the mongoDatabase variable that corresponds to the MongoDB database. In this case, the file system uses the "fs" prefix.
<File name>: Character string
Name of file to delete.
Related Examples:
Native access to MongoDB Unit examples (WINDEV): Native access to MongoDB
[ + ] This example shows how to use the main functions of native access to MongoDB databases: adding data, reading (searching), modifying and deleting data in the database. The example also shows functions for saving files in the MongoDB GridFS data system.
Component: wd290big.dll
Minimum version required
  • Version 22
This page is also available for…
Click [Add] to post a comment

Last update: 06/22/2023

Send a report | Local help