in reply to Entering and Retrieving data from a database.

First, try writing the minimal program that fails. Then ask yourself how it failed. That is, did the query return an error or an empty record. If an error, address it. If an empty record, print the query as specified and try it manually.
  • Comment on Re: Entering and Retrieving data from a database.