Hi
The problem is solved after a recompile of QT with options:-
-system-sqlite -v -I//sqlite-3.6.17 -L//sqlite-3.6.17/.libs ,
whereas previously i had compiled sqlite as plugin.
Now the trigger message is caught promptly by :-
sqlite3 *handle = *static_cast(v.data());
if (handle
Jan,
my system dont have any file named llibsqlite , in my filesystem
but i have
/usr/lib/libsqlite.so
/usr/lib/libsqlite.so.0
/usr/lib/libsqlite.so.0.8.6
/usr/lib/libsqlite3.so
/usr/lib/libsqlite3.so.0.8.6
my pro file have
LIBS += /usr/lib/libsqlite.so
INCLUDE +=/usr/include
afaik on unix you need this
LIBS += -L/usr/lib -llibsqlite
greensparker schrieb:
> Im in Debian Linux.,
> This is my pro file
>
> QT += sql
> LIBS +=/usr/lib/libsqlite.so
> INCLUDE +=/usr/include
> HEADERS += mainMenu.h
> SOURCES += main.cpp \
> mainMenu.cpp
>
> headers in my mainMenu.cpp
Im in Debian Linux.,
This is my pro file
QT += sql
LIBS +=/usr/lib/libsqlite.so
INCLUDE +=/usr/include
HEADERS += mainMenu.h
SOURCES += main.cpp \
mainMenu.cpp
headers in my mainMenu.cpp file
#include "mainMenu.h"
#include
#include "DBConnection.h"
#include// path = usr/loc
If your are on windows try this in your .pro file:
win32:LIBS += [yourpath]\libsqlite.lib
win32:INCLUDEPATH += [yourpath]\include
Check Qt docs on qmake for unix.
Jan
greensparker schrieb:
> jan Thnks fr ur support. I have included sqlite3.h.
> But getting the following err.
>
> 69: undefined
jan Thnks fr ur support. I have included sqlite3.h.
But getting the following err.
69: undefined reference to`sqlite3_errmsg'
:-1: error: collect2: ld returned 1 exit status
How to resolve?
Thnks
Bala
--
View this message in context:
http://old.nabble.com/how-to-get-the-Trigger%27s-Raise-err
sqlite3.h
greensparker schrieb:
> what are the headers i need to add in QT , to get sqlite3 *handle syntax and
> sqlite3_errmsg working ??
>
>
> jan-118 wrote:
>> greensparker schrieb:
>>> i want the trigger's raise error in QT call.
>> Try this in Qt:
>>
>> QString msg;
>> QVariant v = QSqlDat
what are the headers i need to add in QT , to get sqlite3 *handle syntax and
sqlite3_errmsg working ??
jan-118 wrote:
>
> greensparker schrieb:
>> i want the trigger's raise error in QT call.
>
> Try this in Qt:
>
> QString msg;
> QVariant v = QSqlDatabase::database().driver()->handle();
> s
greensparker schrieb:
> i want the trigger's raise error in QT call.
Try this in Qt:
QString msg;
QVariant v = QSqlDatabase::database().driver()->handle();
sqlite3 *handle = *static_cast(v.data());
if (handle != 0)
msg =sqlite3_errmsg(handle);
Jan
__
thnks igor ,
the return type of q.exe is bool
bool QSqlQuery::exec ( const QString & query )
q.lasterror() returned
QSqlError(19, "Unable to fetch row", "constraint failed")
I dont know how to track this.
i want the trigger's raise error in QT call.
Thnks
Bala
Igor Tandetnik wrote:
>
>
greensparker wrote:
> im using QT4.5 and sqlite3
>
> im using BEFORE INSERT TRIGGER for validation purpose
> [is it good idea to put validation on before_insert_trigger???]
You could have a CHECK constraint in the table definition instead.
> IN QT im inserting as
> q.exec("insert into PARAM_DET
hi,
im using QT4.5 and sqlite3
im using BEFORE INSERT TRIGGER for validation purpose
[is it good idea to put validation on before_insert_trigger???]
im generating err , when the validation fails
like
create TRIGGER MobileValid BEFORE INSERT on PARAM_DETAILS
when new.PARAM_CODE=12
BEGIN
12 matches
Mail list logo