LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview interface with MongoDb or similar NoSql database

Yeah. It did work! Thanks a lot!Smiley Very Happy

0 Kudos
Message 11 of 46
(2,394 Views)

Hey, I tried using the LabVIEW wrappers and the VI GetCollectionNames.vi is broken. The error I get states that the MongoDatabase node ( GetCollectionNames ) has an unwired node. Yet, no matter how many times I rewire the nodes, it remains broken. Any ideas on what the problem is or what the problem actually is?

0 Kudos
Message 12 of 46
(2,357 Views)

@BigJosh2013 wrote:

Hey, I tried using the LabVIEW wrappers and the VI GetCollectionNames.vi is broken. The error I get states that the MongoDatabase node ( GetCollectionNames ) has an unwired node. Yet, no matter how many times I rewire the nodes, it remains broken. Any ideas on what the problem is or what the problem actually is?


It would help if you posted your VI.

0 Kudos
Message 13 of 46
(2,347 Views)

It's located in the zip in message 7 of this Discussion forurm. The VI in question is GetCollectionNames.vi.

0 Kudos
Message 14 of 46
(2,338 Views)

I was able to fix the issue when I modified the Get Collection Names.vi by deleting the database node that calls GetCollectionNames, created a new database node and setting it to GetCollectionNames, and wiring it. Go figure.

0 Kudos
Message 15 of 46
(2,319 Views)

This is awesome,

but i have one doubt,

how can i assign the ID to the MongoDocument, i see that in this example you generate and ObjectID (Type) and ID, so,

if i need an ID like 1, 2, 3 how can i make it?

 

thanks anyway!!!!

and great work!

0 Kudos
Message 16 of 46
(2,191 Views)

Hi EstebanVS,

 

You might want to try to make a new forum post. This one is over six months old, and there's a good chance the original poster won't reply.

0 Kudos
Message 17 of 46
(2,142 Views)
Hi Esteban,

The _id field is the one which mongodb uses as a primary key, you can set it to anything (in the BSON record). In the mongodb docs there is a way to have an auto incrementing id (http://docs.mongodb.org/manual/tutorial/create-an-auto-incrementing-field/).

Hope that helps! It's been a while since I looked at this.

Regards,

Peter D

0 Kudos
Message 18 of 46
(2,136 Views)

wow, thanks for your reply guys,

i will look at it, but in the example you post theres no way to write right?


Pete.Dunc escribió:
Hi Esteban,

The _id field is the one which mongodb uses as a primary key, you can set it to anything (in the BSON record). In the mongodb docs there is a way to have an auto incrementing id (http://docs.mongodb.org/manual/tutorial/create-an-auto-incrementing-field/).

Hope that helps! It's been a while since I looked at this.

 

 

0 Kudos
Message 19 of 46
(2,126 Views)
To make it happen you would edit the BSON creation to include a field called _id with the data type you need. The other option is to create a new field which is unique and create an index for it.

http://docs.mongodb.org/manual/tutorial/create-a-unique-index/

Regards,

Peter D

Message 20 of 46
(2,099 Views)