First, I would highly commend that you use a XS project rather than a general project. Second, I think you might be getting an error saying that you are only allowed to create read-only procedures in your system. If that is the case, you need to change the sqlscript_mode value to UNSECURE in the indexserver.ini in the configuration tab of the administration console. Then you need to remove the line that says.... READS SQL DATA from your procedure.
Cheers,
Rich Heilman