locked
Got Bad Request Error when query Table entities with Azure Storage Client Library for C++ (7.3.1) RRS feed

  • Question

  • Hi,

    I am following the instructions at this page with title "How to use Azure Table storage and Azure Cosmos DB Table API with C++" to create and query entities:

    query.set_filter_string(azure::storage::table_query::generate_filter_condition(U("PartitionKey"), azure::storage::query_comparison_operator::equal, U("Harp")));

        // Execute the query.
        try
        {
            azure::storage::table_query_iterator it = table.execute_query(query);

        }

    Creating the table and entities is fine, but when querying the entity just created, I got exception. The message is:

    {"odata.error":{"code":"InvalidInput","message":{"lang":"en-us","value":"Request url is invalid.\r\nActivityId: 70f3808f-2030-48ed-8bc3-5de6eba3a53e, documentdb-dotnet-sdk/2.10.0 Host/64-bit MicrosoftWindowsNT/6.2.9200.0\nRequestID:70f3808f-2030-48ed-8bc3-5de6eba3a53e\n"}}}

    Please help to investigate what might be missing.

    Thanks.

    Monday, May 11, 2020 5:58 PM

Answers

All replies

  • Hi Tao,

    In the document you reference (How to use Azure Table storage and Azure Cosmos DB Table API with C++), there is specific reference to a set of methods that are not supported in Cosmos DB.

    The following note is detailed above those methods not supported:

    These methods are not currently supported for C++ in Azure Cosmos DB.

    Please see Query and modify entities for a list of unsupported C++ methods for Azure Cosmos DB.

    Please see the Retrieve a single entity section for supported C++ methods for Azure Cosmos DB.

    Please let me know if you have additional questions.

    Regards,

    Mike

    Thursday, May 14, 2020 7:34 PM
  • Hi Tao,

    Please let me know if you have any additional questions with this.

    Regards,

    Mike

    Sunday, May 17, 2020 4:01 AM
  • Hi Mike,

    Thank you for your response! The method in Retrieve a single entity section works well. It would be nice to remove the unsupported methods from the original document going forward.

    Thanks again for your help - appreciate it.

    Tao

    Tuesday, May 19, 2020 6:15 AM