Forum OpenACS Q&A: Response to Problem Reports & Bboard

Collapse
Posted by Arjun Sanyal on
<blockquote>night tracking down a similar problem. I had to make the same change
on line 290 to be able to post my first message to my first board.
</blockquote>

Thanks for the bug report. You are using categories, right? I hadn't tested the categories code yet, so I didn't notice this bug.

<blockquote>Now that I'm back near a phone line I can ask, should the same
(s/db_dml/db_exec_plsql/ change be made on line 290 and elsewhere?
</blockquote>

After some digging in the db_api and pgdriver code, it appears to me that db_dml should be used when a dml statement is being called directly as in the other db_dml calls in this file, and db_exec_plsql should be used when the code is calling a stored proc, such as in these two cases.

NSDB (i.e. the aolserver api) was choking on the "select" when it was expecting a dml statement. If you look in your aolserver error log you will see lines like:  "Database operation "dml" failed (exception NSDB, "Query was not a DML or DDL command."

Could someone with some experience with the db api comment on the best practices wrt the various procs of the db api? This may be documented somewhere, but I haven't found it.