Forum OpenACS Q&A: Re: Troubles with form templates

Collapse
Posted by Jon Griffin on
Well first off, you will be much happier using ad_form. See http://jongriffin.com/static/openacs/ad_form/using-ad-form

But that is old AD code and really isn't called if you have a .xql file. It is calling note.new which is Oracle dependent.

That should be taken out. Notes is a really bad example of how to write a package.

Collapse
Posted by Tilmann Singer on
In this particular case it is calling the query from add-edit-postgresql, note__new (if you're using postgres, that is).

I tried to look up some documentation on the query dispatcher to post it here but couldn't find any. In case there doesn't exist one yet you might want to look at the comment at the bottom of the db api documentation page: https://openacs.org/doc/openacs-4/db-api-detailed.html.

Side note: you wrote db_exec_plsql with a 1 instead of an l ('ell') at the end - that looks like an easily overlooked error :)

Side note 2: I have a half-finished version of notes that uses ad_form and should be a better example - if anyone has time to finish it mail me (otherwise I'll do it sometime).

Collapse
Posted by Jade Rubick on
What is the best example of a simple package that should be emulated for those just starting on OpenACS?