There is no method for actually recovering a forgotten passcode but your data will still be accessable via iTunes, or as long as the device has been set to allow WiFi access, by mapping the device as a drive to your PC/Mac.
To use Wifi you will need to connect to the device via Explorer (Windows), Finder (Mac) or a Web browser, using the address of your device in the form "http://XXX.XXX.XXX.XXX:8080".
You may also connect via iTunes via the following method:
1. Open iTunes and connect your device to the computer using the USB cable.
2. Select your device from the left hand window in iTunes.
3. Select Apps tab from the right hand window in iTunes. Scroll to the bottom of the window and you will see a section called File Sharing.
4. You can select the app from the left hand part of this section. You should then see all the files currently in the app listed. To add a file, press the "Choose Files" button and then select the files from your local computer. When you press OK, the files will get synchronized to your phone and will appear in the file list in the app.
Using whichever of the above methods to attach to the device, you should then copy your local folders and files to an external source. Once this is done, and you are confident with the backup, you should delete the app. This action also deletes the local files and folders. You may then reinstall the app from the app store. As long as you use the same iTunes username that you originally used to purchase the app you will not be charged again - even though you go through the process of repurchasing the app.
Once the app is installed you may restore your local folders and files from the backup taken previously.