Friday, September 20, 2013

How do i query to check records with two matching strings

Hello,
      I have created project using jsp, servlets in netbeans6.9 and datastore 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/ffeffdc5-9598-45b0-9f0f-58aacbc8ec65%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment