The topic has moved to procedures and functions in general, which isn't wrong, but let me go back to your initial question.
It's not wrong to use the dbc for database related code aka stored procedures. Don't focus too much on the term procedure here, stored procs are also called this way for other databases, even if it's not about procedures but about scalar or even table valued functions. The majaor difference of procedure vs function has become obsolete in several ways in VFP. For one, you can RETURN values from both a function and procedure. The major difference in the past was about passing parameters by value vs by reference, I'd rather SET UDFPARMS TO VALUE and pass things by reference via @ prefix. Objects are passed by reference only, but all that has still very low impact on DB stored procs. Also open up a scx or vcx as table and look into the code memos, you'll see every method or event is stored there as a procedure. The keyword function has become obsolete, if you ask me, but I tend to make the difference of functions returning a value and procedures not.
The main downside of stored procs is, if you want to move to Sybase with dbfs, you can't reuse much of the code there, also clients using DBC via the original MS VFP ODBC driver are limited to VFP6. IIRC TaxRI is a third party referential integritiy code builder using code compatible to VFP6. But if that's not your concern, you can even use it to prevent ODBC access to your data by simply enabling DBC evens. It's not a strong protection, as that can be turned off in the DBC, which can be read any modified as a free table.
Anyway, the DBC allows storage of the code in itself, it'll be in one of the first three records of the DBC file (more precise in the DCT). You can only store code related to the DBC Events in an external PRG. But this is not a big problem about the stored procs location. The major entry points to stored procs are by expressions as default values of fields, table and field rules and insert-, update-, and delete-triggers. All those can call into anything in scope, not only into the code of the stored proc memo or the external dbc events prg file. If you use a application class, you can call into goApp.somemethod or anything you want from all the calls into dbc related code. Remember, in case of VFP there is no database server separated from the client side code, everything including stored procs runs at the client and can be linked to application code, too. This advantage is a disadvantage, if you later would like to port the database including the database related code to a db server. Also, if you use the db from several apps, you either shae some part of your code/framework or you put it to the db.
The only third party tool making much use of stored procs and dbc events is the dbcx extension, which eg is used by stonefield database toolkit. It puts a vcx file to the dbc, which is used by dbc embedded code. And that's a very valid approach to combine the native outset with oop design. Don't look out for DBCX, but DBCX2, see
Bye, Olaf.