Re: [sqlite] Error in SQLITE on applyNumericAffinity
On 9/12/07, Stéphane Thiers <[EMAIL PROTECTED]> wrote: Somehow I missed replying earlier, sorry about that. > The column which contains these numbers is > declared as REAL. This raises another question to > me: I thought that the numbers were stored as > strings, so why sqlite would try to transform these strings into double? By declaring the column as REAL, you provided a type affinity. That means sqlite will try to convert any provided input into REAL form (which is double), and only store the original type if that fails. If you don't declare a type for the column, then the value you input will stay in the same type you provided it in (i.e. string). - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Error in SQLITE on applyNumericAffinity
Hi, Actually, I've found a workaround: To create the sql request, I use a stringstream. I've set the precision of this stream to 30 (instead of default which is 6 I think). This made the request's '1.79769e+308' be trandformed into '1.79769313486232e+308'. But this does not explain *why* the problem occured. Could it be that sqlite does not find a double representation of the string '1.79769e+308' but finds one for '1.79769313486232e+308' ? The column which contains these numbers is declared as REAL. This raises another question to me: I thought that the numbers were stored as strings, so why sqlite would try to transform these strings into double? Stéphane At 11:01 12/09/2007, Trevor Talbot wrote: On 9/12/07, Stéphane Thiers <[EMAIL PROTECTED]> wrote: > I got this stack error in SQLITE when executing the following request: I assume there's an exception that goes with this; what is it? > "INSERT INTO _scalars_float > VALUES(237,220,'ComputedNoise','Noise','Noise > level estimated by the smoothing > algorithm','DouglasPeuckerAlgorihtm',0,0,NULL,'-1.79769e+308','1.79769e+308','%.2f','') If this is part of C-style code, what value was used as an argument for "%.2f"? > mscorlib.ni.dll!793612c2() > mscorlib.ni.dll!79361141() What are you using the CLR for in this process? - To unsubscribe, send email to [EMAIL PROTECTED] - Stéphane Thiers Data Systems, Lancelot Applications Software Group Engineer Scientific Instruments Varian Data Systems S.A.S 1 Rue Hector Berlioz ZAC DES PLANS F-38600 FONTAINE FRANCE Tel: +33 4 76 53 35 80 Fax: +33 4 76 53 35 89 [EMAIL PROTECTED] http://www.varianinc.com Inspiring Excellence
Re: [sqlite] Error in SQLITE on applyNumericAffinity
On 9/12/07, Stéphane Thiers <[EMAIL PROTECTED]> wrote: > I got this stack error in SQLITE when executing the following request: I assume there's an exception that goes with this; what is it? > "INSERT INTO _scalars_float > VALUES(237,220,'ComputedNoise','Noise','Noise > level estimated by the smoothing > algorithm','DouglasPeuckerAlgorihtm',0,0,NULL,'-1.79769e+308','1.79769e+308','%.2f','') If this is part of C-style code, what value was used as an argument for "%.2f"? > mscorlib.ni.dll!793612c2() > mscorlib.ni.dll!79361141() What are you using the CLR for in this process? - To unsubscribe, send email to [EMAIL PROTECTED] -
[sqlite] Error in SQLITE on applyNumericAffinity
Hi, I got this stack error in SQLITE when executing the following request: "INSERT INTO _scalars_float VALUES(237,220,'ComputedNoise','Noise','Noise level estimated by the smoothing algorithm','DouglasPeuckerAlgorihtm',0,0,NULL,'-1.79769e+308','1.79769e+308','%.2f','') The stack is the follwoing ntdll.dll!7c90eb94() [Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll] ntdll.dll!7c90e9c0() kernel32.dll!7c8025cb() kernel32.dll!7c80a027() ntdll.dll!7c9105c8() ntdll.dll!7c910551() mscorlib.ni.dll!793612c2() mscorlib.ni.dll!79361141() Sqlite.dll!releasePage(MemPage * pPage=0x79e7bce8) Line 982 + 0x10 bytes C ntdll.dll!7c910732() ntdll.dll!7c910732() ntdll.dll!7c9106ab() ntdll.dll!7c9106eb() Sqlite.dll!balance_quick(MemPage * pPage=0x79e75848, MemPage * pParent=0x0015) Line 4262 + 0xf bytes C ntdll.dll!7c9037bf() ntdll.dll!7c90378b() ntdll.dll!7c937860() msvcr80d.dll!_getptd() Line 658 + 0x5 bytesC msvcr80d.dll!_LocaleUpdate::_LocaleUpdate(localeinfo_struct * plocinfo=0x102478b2) Line 264 + 0x5 bytesC++ msvcr80d.dll!_chvalidator(int c=83558400, int mask=83439616) Line 57 + 0xf bytes C++ msvcr80d.dll!isdigit(int c=2089872122) Line 141 + 0xb bytesC++ ntdll.dll!7c910732() ntdll.dll!7c9106ab() ntdll.dll!7c9106eb() ntdll.dll!7c91056d() ntdll.dll!7c911962() ntdll.dll!7c911993() ntdll.dll!7c911970() Sqlite.dll!applyNumericAffinity(Mem * pRec=0x07b67458) Line 239 + 0xf bytesC Sqlite.dll!applyAffinity(Mem * pRec=0x07b67458, char affinity='e', unsigned char enc='') Line 274 + 0x9 bytes C Sqlite.dll!sqlite3VdbeExec(Vdbe * p=0x07b62428) Line 2280 + 0x29 bytes C Sqlite.dll!sqlite3Step(Vdbe * p=0x07b62428) Line 247 + 0x9 bytes C Sqlite.dll!sqlite3_step(sqlite3_stmt * pStmt=0x07b62428) Line 302 + 0x9 bytes C > Sqlite.dll!sqlite3_exec(sqlite3 * db=0x0793bbf8, const char * zSql=0x07b66a88, int (void *, int, char * *, char * *)* xCallback=0x, void * pArg=0x, char * * pzErrMsg=0x04fadc50) Line 76 + 0x9 bytes C any hint ?? Thank you. Stéphane Thiers Data Systems, Lancelot Applications Software Group Engineer Scientific Instruments Varian Data Systems S.A.S 1 Rue Hector Berlioz ZAC DES PLANS F-38600 FONTAINE FRANCE Tel: +33 4 76 53 35 80 Fax: +33 4 76 53 35 89 [EMAIL PROTECTED] http://www.varianinc.com Inspiring Excellence