I'm not quite sure I understand callbacks in the context of a database query.
How I normally call a stored procedure in DTL:
Parameters params;
params.A = "something";
params.B = "something";
// params.C is an output parameter
// BPA is just a parameter mapping structure, similar to .sch file
DBView<Parameters> view (
"{call stored_procedure_x (?, ?, ?)}",
stored_procedure_bpa()
);
// Create an iterator pointing to the view
DBView<Parameters>::sql_iterator sprocIter = view.begin();
// Copy params into the stored procedure iterator
*sprocIter = params;
// In DTL, incrementing an iterator executes stored procedure
++sprocIter;
// Now sprocIter->C will hold results from calling the stored procedure