MongoDB.CloseCursor
-------------------

Closes cursor.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [MongoDB](component_MongoDB.md) | [12.3](newinversion123.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "MongoDB.CloseCursor"; MongoDBRef ) 

**MBS**( **"MongoDB.CloseCursor";** /\* Closes cursor. \*/  
**$MongoDBRef**) /\* The reference number for the mongo connection.e.g. $MongoDB \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| MongoDBRef | The reference number for the mongo connection. | $MongoDB |

### Result

Returns OK or error.

### Description

Closes cursor.  
This function is optional to close the current cursor.  
Normally it is freed when a new one is set or the [MongoDB.Release](MongoDBRelease.md) function is called.  
This function returns OK whether a cursor is there or not.  
### Examples

Close cursor explicitly:

 Set Variable \[ $r ; Value: MBS ( "MongoDB.CloseCursor"; $Mongo ) \]  
### See also

- [MongoDB.FindDatabases](MongoDBFindDatabases.md)
- [MongoDB.Release](MongoDBRelease.md)

This function checks for a license.

Created 20th June 2022 , last changed 20th June 2022

  
[MongoDB.CloseCollection](MongoDBCloseCollection.md) - [MongoDB.CloseDatabase](MongoDBCloseDatabase.md)

[HTML Version](MongoDBCloseCursor.shtml)