title: MongoDB Connect to VB.NET Visual Studio 2013
body: <p>I want to connect MONGO DB to my VB Application i am making. I installed the essentiaal drivers, my MongoDB Server is running perfect. I can access it using MongoVUE but connection via VB somehow does not work</p>
  
  <pre><code>    Imports MongoDB.Driver
      Imports MongoDB.Driver.Linq
      Imports MongoDB.Driver.Builders
      Imports MongoDB.Bson
  
      Public Class frmMongoDB
      '&lt;ObsoleteAttribute("Use MongoClient, GetServer and GetDatabase instead.")&gt;
  
      Private Sub frmMongoDB_Load(sender As Object, e As EventArgs) Handles MyBase.Load
      Dim server As MongoServer
      Dim db As MongoDatabase
      Dim coll As MongoCollection
  
      server = MongoServer.Create("mongodb://localhost:27017")
      db = server("db1")
      coll = db("table1")
  </code></pre>
  
  <p>The line called server gets underlined and says " Public Shared function create as (connectionString as MongoDB.Driver.Mongo Server obsolete, Use MongoClient.GetServer instead"</p>
  
  <p>I've tried  Dim server As MongoServer = MongoServer.Create("mongodb://localhost")</p>
  
  <p>But dosen't work either. Please help.</p>