C# SDK - N1QL not returning rows

I am using the .NET SDK 2.0.1.0

I used the N1QL from the web interface that came with the tutorial and executed a simple query and it works on that web page. Please find the attachment.

But when I try to use the same query from C# SDK, it does not return any rows.
Bucket.Query(“SELECT * FROM MsTest WHERE metadata.fqen = ‘Customer.User’”);

I am able to see from the N1QL command prompt that it fetched 3 records. But it did not come to C# program for some reason. I always got 0 Rows in my program. Please find attached the screenshot.

Please help!

@kris_smarty -

I think the problem is that you are using N1QL DP4 with SDK 2.0.0.1, try updating to SDK 2.0.2 and see what happens. Also, the check the Errors property or the reason.

Thanks,

-Jeff

Thanks Jeff! It worked.

1 Like