Hi Javier,
You're welcome. Glad to know you got it to work. Applets can be very tricky and hard to debug.
Regarding its creation I would recommend to do it using the Tcl API instead of a SQL script. It's less prone to error. Same for the portlet part.
I've uploaded an example based on the tutorial written by César Claveria and Rocael Hernández (U.Galileo, Guatemala). The example contains a simple To-do application along with its portlet and applet. In this example, no SQL is used for their creation, Tcl code only.
To-do packages: https://openacs.org/storage/file?file_id=4034160