How can I retrieve MongDB data and load in textboxes using javadriver?
I tried the following code to show data, but I want to get the data in textboxes:
BasicDBObject doc = new BasicDBObject();
doc.put("Name", v2);
doc.put("SID", n4);
doc.put("University", v4);
DBCursor Cur = coll.find(doc);
System.out.println(Cur);
The following code fragment shows how to extract the individual fields of a document when you iterate over the results of a query. You could, if you wanted, take each field and put it in a textbox of a GUI.
The complete code sample is here: https://gist.github.com/3087822