That example is using an Informix database. It isn't something you can just copy and paste. It's intended to show you how to use FDF without using the FDF Toolkit. You need to install MySQL, Postgres, or whatever database you want, create the database and table(s), and change the code to reflect the database software and structure you are using.
Also, that example also shows how to populate the PDF not how to get the FDF data from the PDF file.
Hank