[Qt-interest] Application crashes while using sqlite3_enable_load_extension

Bill KING bill.king at trolltech.com
Wed Mar 11 00:06:17 CET 2009


Christoph Krämer wrote:
> Hi,
>
> I’m trying to use Qt to load extensions form my SQLite Database.
> Unfortunately my app always crashes when I try to use sqlite3 that was
> created by 
>
> QVariant v = db.driver()->handle();
>  if (v.isValid() && qstrcmp(v.typeName(), "sqlite3*")==0) {
>      // v.data() returns a pointer to the handle
>      sqlite3 *handle = *static_cast<sqlite3 **>(v.data());
>      if (handle != 0) { // check that it is not NULL
>          sqlite3_enable_load_extension(handle,1);
>      }
>  }
>
>
> Thanks
> Chris
>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>   
I take it you're using -system-sqlite in your configuration settings, if
your'e not, that could cause massive possible issues with different and
conflicting globals.

-- 
Bill King, Software Engineer
Qt Software, Nokia Pty Ltd
Brisbane Office




More information about the Qt-interest-old mailing list