Friday, September 20, 2013

How do I query for checking two string type fields

Hello,
      I have created project using jsp, servlets in netbeans6.9. I am able to store whole entity values as well as retrieve all. But when i  write query as given below its showing error :-> com.google.appengine.api.datastore.EntityNotFoundException: No entity was found matching the key: firstname("Smita")

my code is here,
String uname="Smita";
DatastoreService ds = DatastoreServiceFactory.getDatastoreService();
Key key = KeyFactory.createKey("firstname", uname);
Entity ent = ds.get(key);

plz help me, i wants to check two fields firstname and lastname (need query as in mysql   select * from logininfo where firstname='smita' and lastname='sharma');
Thanks......

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/3cdc5c35-2655-4f19-a41e-44e9fe5640ee%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment