DDCODE

Share programming skills from Magic Oriental

upArrow

An error was reported when the mongoDB database inserted data: db.collection is not a function

 May 12, 2019   mongodb, question

The code is as follows:图片描述

After execution, an error was reported in the terminal, as shown in the following figure:
图片描述

Please give directions, thank you

Should you choose a database first?var db = db.db("mydb");

Related Posts:

  • Mysql sets the phone field to be the only record…
  • IOS FMDatabase returns YES when inserted but cannot…
  • Using spring-data-mongodb to insert data in batches,…
  • The collection created by mongodb cannot be deleted…
  • How to copy the collection from MongoDB database to…
  • After node.js is successfully used to connect…
  • PHP randomly comes up with a combination of numbers…
  • Why can't you use mongodb online database to…
  • The Mongodb Mapreduce output option is replace to a…
<< What database support is better for a two-two mentioned query requirement? How does MongoDB add label field names >>

Related Posts:

  • Mysql sets the phone field to be the only record…
  • IOS FMDatabase returns YES when inserted but cannot…
  • Using spring-data-mongodb to insert data in batches,…
  • The collection created by mongodb cannot be deleted…
  • How to copy the collection from MongoDB database to…
  • After node.js is successfully used to connect…
  • PHP randomly comes up with a combination of numbers…
  • Why can't you use mongodb online database to…
  • The Mongodb Mapreduce output option is replace to a…

Tags

Android android-studio apache c c++ centos Css css3 Database Docker Eclipse Express Front end git GitHub golang Html html5 Ios java javascript Jquery Laravel linux macos mongodb mysql Nginx node.js npm objective-c php Programmer python redis ruby shell Spring Sql Swift ubuntu vim vue.js Web xcode

Powered by MyWiki WordPress Theme