Aaron Stone wrote:
Is this in place of using a for loop? It would work, but there might be some code where memory allocations or other logic occurs on the basis of the number of rows that were found. Just keep an eye out for such things.
I've seen the code fragments, where memory allocation occurs. If it was necessary to know the db_num_rows, I inserted a 'select count(*)' statement, but with libdbi, i can use 'dbi_result_get_numrows' instead.
There was a SQL intermediary library that we had been looking at a few weeks ago, and if it already has Firebird support, your efforts would be better spent writing a DBMail interface to that common backend: http://libdbi.sourceforge.net/
I read the documentation and examples for libdbi and think it wouldn't be all-too difficult to change the db-interface. I checked out 'dbmail' from cvs-system and be in progress to change db-interface. Can I add a param 'driverdir' and 'driver' in 'db_param_t' for configuring the database-driver? If 'driverdir' is NULL then DBI_DRIVER_DIR would be used (compiled in libdbi). I would also spend time to make tablenames configurable (in TODO). Should I create a struct 'db_tables_t' or add all 11 tableconfigs in 'db_param_t'? Are you generally agree that I help you? Or would you do it yourself? I would do it, if you allow me. Thanks for your answer. Dominik Fässler
