[sqlite] how to get the Trigger's Raise err in Application

2009-10-28 Thread greensparker
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

Re: [sqlite] how to get the Trigger's Raise err in Application

2009-10-28 Thread greensparker
a 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 defini

Re: [sqlite] how to get the Trigger's Raise err in Application

2009-10-29 Thread greensparker
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::

Re: [sqlite] how to get the Trigger's Raise err in Application

2009-10-30 Thread greensparker
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:

Re: [sqlite] how to get the Trigger's Raise err in Application

2009-10-30 Thread greensparker
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 =

Re: [sqlite] how to get the Trigger's Raise err in Application

2009-10-30 Thread greensparker
-118 wrote: > > 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 +=

[sqlite] Doubt in Trigger

2009-11-19 Thread greensparker
hi im using Before TRIGGER for validation PURPOSE (before inserting) i just want to know , is there any way to use the same trigger for UPDATE also. ex: create trigger Testing before insert or update on testTable begin end; is it possible to have[insert or update] ? Bala --

[sqlite] char,ascii function in sqlite

2009-12-06 Thread greensparker
hi , im using sqlite3 in debain i want to check the first character should not be an special character. [by before insert trigger] how to do it? i thought of using ascii function but i didnt find in sqlite. Greensparker -- View this message in context: http://old.nabble.com/char%2Cascii

[sqlite] Error in retreiving DATETIME('NOW')

2009-12-17 Thread greensparker
hi, im having a error in retreiving the DATETIME from SQLITE im in DEBIAN. when i give SELECT DATETIME('NOW') im getting the TIME : 2009-12-17 15:35 but my system time is : 2009-12-17 21:05 IST my timezone is INDIA. IST. pls tell me, why DATETIME() function gives wrong time? Greensparker

Re: [sqlite] Error in retreiving DATETIME('NOW')

2009-12-17 Thread greensparker
SELECT DATETIME('NOW','localtime'); is WORKED but i want to use my localtime as default time in sqlite(without giving 'localtime'). is it possible? Greensparker SimonDavies wrote: > > 2009/12/17 greensparker <balamurugan.c...@gmail.com>: >> >> hi, >>  i

Re: [sqlite] Error in retreiving DATETIME('NOW')

2009-12-18 Thread greensparker
k thanks expertz Pavel Ivanov-2 wrote: > >> but i want to use my localtime as default time in sqlite(without giving >> 'localtime'). is it possible? > > No. And documentation clearly says about that. > > > Pavel > > On Thu, Dec 17, 2009 at 11:

[sqlite] how to load custom function from QT

2010-01-23 Thread greensparker
hi, im using DEBIAN,QT4.5.2 I have custom functions in sqlite,like ascii,ceil,floor etc. lib name is myfunciton.so. i have tested manually in sqlite3 command line by using, select load_extension('myfunction.so') . Its working well. my question is ,how can i automate this with QT. i want to

Re: [sqlite] how to load custom function from QT

2010-01-24 Thread greensparker
4th parameters in sqlite3_load_extension.just i put 0 and 0. The program stop responding @ int b = sqlite3_load_extension(handle,zFilename,0,0); Thnks Bala Kees Nuyt wrote: > > On Sat, 23 Jan 2010 22:57:24 -0800 (PST), greensparker > <balamurugan.c...@gmail.com>

Re: [sqlite] how to load custom function from QT

2010-01-25 Thread greensparker
can somebody help me to solve this? Bala -- View this message in context: http://old.nabble.com/how-to-load-custom-function-from-QT-tp27292725p27304796.html Sent from the SQLite mailing list archive at Nabble.com. ___ sqlite-users mailing list

Re: [sqlite] how to load custom function from QT

2010-01-25 Thread greensparker
Thnks michel for ur reply. yes thats the way. i also tried using the HANDLE. but the query failed in int b = sqlite3_load_extension(handle,zFilename,0,0); my program hangs when i put 0,0 to the third and forth parameter in sqlite3_load_extension funciton. any tips? Thnks Bala -- View this

[sqlite] stale nfs file handle err in my database

2010-03-22 Thread greensparker
hi , im using armlinx 2.6 kernel. sqlite 3.6.19. im getting the STALE NFS FILE HANDLE error. The following is my scenareo A Bulk insert is happening on the database. suddenly system powered off during the bulk insert. when im booting again , i got the STALE NFS FILE HANDLE error . when i do ls