There is no way to implement this in Poco. But you can use Poco::Data::SQLite::Session::getProperty(const std::string&) to obtain underlying SQLite db handle and use it to register your external function

This feature is, however, only available in trunk and will be available in 1.5 release. See SQLiteTest::testInMemory() in the trunk for example on how to use the feature.

HTH

P.S. Pasting your entire code here is diminishing your chances of getting help. Instead, you should explain with snippets what you are trying to do or publish the code elsewhere (e.g. on your web site).

I am using Poco 1.4.3, so Is their any way to get the underlying database from POCO session in 1.4.3?

I tried getting the SessionImpl* from Session through Session::impl() interface, and this gives me Poco/Data/SessionImpl class object pointer, but I can not get underlying database handle from this Poco/Data/SessionImpl object pointer.

However their is one more SessionImpl class in Poco/Data/SQLite and this class has inline functioninline sqlite3* SessionImpl::db(){ return _pDB;}

but the problem is I do not get the pointer of Poco::Data::SQLite::SessionImpl class from the Session::impl() function and hence could not get the underlying database handle.

Once I get the underlying sqlite database handle from the POCO Session in version 1.4.3, I can go ahead with the loadable extension feature.