PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Declaration
  • Properties specific to the description of mongoConnection variables
  • Functions that use the mongoConnection type
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
mongoConnection (Type of variable)
In French: mongoConnexion
The mongoConnection type is used to define the advanced characteristics of a connection to a MongoDB server. The characteristics of this connection can be defined and modified by several WLanguage properties.
Note: See Declaring a variable for more details.
Example
cntMDB is MongoConnection
cntMDB = MongoCreate("mongodb://db1.example.net")
FOR EACH MyDatabase OF cntMDB..Database
Trace(MaDatabase..Name)
END
cntMDB is MongoConnection("mongodb://db1.example.net")
FOR EACH MyDatabase OF cntMDB..Database
Trace(MaDatabase..Name)
END
Declaration
MyVariable is mongoConnection(<Connection String>)
<Connection String>: Character string with quotes
Connection string to the server or connection string of cluster that is hosting the MongoDB database. See the documentation about MongoDB for more details.
Remarks

Properties specific to the description of mongoConnection variables

The following properties can be used to handle a MongoDB connection:
Property nameType usedEffect
DatabaseArray of mongoDatabaseAssociative array containing the databases created on the MongoDB server.

Note: These properties can be handled by using one of the following syntaxes:
  • <Variable Name>..<Property Name>
  • <Variable Name>.<Property Name>

Functions that use the mongoConnection type

The following functions are using the mongoConnection variables:
Versions 22 and later
MongoCreate
New in version 22
MongoCreate
MongoCreate
Creates a connection to a MongoDB server or cluster.
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.
Minimum required version
  • Version 22
This page is also available for…
Comments
Click [Add] to post a comment