B4J Question [SOLVED],[BANanoVuetifyAD3] MongoDB doesn't work

NGUYEN TUAN ANH

Active Member
Licensed User
Dear All,
I have successfully connected to the MongoDB database, my "DEM" tbl has 20000 records
i have done the following code but it doesn't work, the result always returns the value 0
my Code:
    Dim mongo As BANanoMongoDB
    mongo.Initialize(Main.Host, Main.DbPort, Main.Database, "DEM")
    mongo.position = 5
    Dim ih As Int = mongo.GetInt("h")
    Log(ih)
Could you please help me. !
Thank you very much
Best Regards
 

NGUYEN TUAN ANH

Active Member
Licensed User
Upvote 0

NGUYEN TUAN ANH

Active Member
Licensed User
Please also if you don't mind, kindly visit all your questions and mark the solution given, this helps other people.

I would greatly appreciate that.
Thank you

My solution for this:
    Dim mongo As BANanoMongoDB
    mongo.Initialize(Main.Host, Main.DbPort, Main.Database, "DEM")
    mongo.ClearWhere
    mongo.AddWhere("k", mongo.EQ_OP, 5)
    banano.Await(mongo.SelectWait)
    Dim row As Map = mongo.result.Get(0)
    Dim ih As Int = row.Get("h")
    Log(ih)
 
Upvote 0
Top