Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-1513

How to run query specified below using c# driver

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Done
    • Icon: Blocker - P1 Blocker - P1
    • None
    • 1.10.1
    • API

    Description

      I am running following query in RoboMongo which seems to work fine.
      db.runCommand(
      {"find":"Equity","filter":{"Ticker": "IBM US Equity"}}
      )

      I want to run same query using C# driver version - 1.10.1.73
      I see following error while running query:
      Command 'find' failed: Failed to parse: filter: "'Ticker': 'IBM US Equity'". 'filter' field must be of BSON type Object. (response:

      { "waitedMS" : NumberLong(0), "ok" : 0.0, "errmsg" : "Failed to parse: filter: \"'Ticker': 'IBM US Equity'\". 'filter' field must be of BSON type Object.", "code" : 9 }

      )

      Attachments

        1. C# Source Code.txt
          0.6 kB
        2. image.png
          image.png
          55 kB
        3. image.png
          image.png
          55 kB
        4. Mongo Error.png
          Mongo Error.png
          51 kB

        Activity

          People

            robert@mongodb.com Robert Stam
            nikhilsalunkhe@gmail.com Nikhil Salunkhe
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: