Corrected version attached with remarks in the code. You'll have to change the db location back to your place though, forgot that one.
Items include:
- parameter names spelled wrong (using field names instead of parameter names)
- the freeing mentioned above
Hope the remarks are clear enough, if not, please let me knoe.
PS: <rant>IF YOU HAD SUPPLIED A SMALL SAMPLE PROJECT THAT DEMONSTRATES YOUR PROBLEMS IN THE FIRST PLACE, WE WOULD HAVE FOUND THESE PROBLEMS DAYS AGO!</rant> Don't talk about your code, POST the code (and not snippets, but everything that is relevant)!
PS2: Did like your posting of screenshots of errors etc, that was very helpful.