[sqlite] sqlite3_table_column_metadata with nil parameters bug ?

2016-11-02 Thread LacaK
Hi *, when I pass to sqlite3_table_column_metadata() function 2,3,4 parameters as null i receive SIGSEGV. Is this expected behavior ? I understand that it does not give big sense call this function with all null parameters, but when I use in generic case as 2,3,4 parameters:

[sqlite] PRAGMA table_info(second.table)

2014-06-05 Thread LacaK
Hi, when I attach database using f.e ATTACH DATABASE 'test.db' AS tets; and in attached database is f.e. table "tab1". Then when I try PRAGMA table_info(test.tab1) , I get error: near ".": syntax error. Is it expected ? (of course SELECT * FROM test.tab1 works as expected ...) Thanks -Laco.

[sqlite] [Fwd: [FEATURE REQUEST] support of %y in strftime()]

2012-09-25 Thread LacaK
- Predmet:[FEATURE REQUEST] support of %y in strftime() Dátum: Fri, 21 Sep 2012 14:15:45 +0200 Od: LacaK <la...@zoznam.sk> Pre:sqlite-users@sqlite.org Hi *, some month ago I wrote question about possibility to add support of %y (2 digit year) to strftime() function. Patch i

[sqlite] [Fwd: [FEATURE REQUEST] support of %y in strftime()]

2012-09-25 Thread LacaK
Please can any developer do any comment on this request? Would it be possible to add such support? Thanks -Laco. - Pôvodná správa - Predmet:[FEATURE REQUEST] support of %y in strftime() Dátum: Fri, 21 Sep 2012 14:15:45 +0200 Od: LacaK <la...@zoznam.sk> Pre:sqlite

[sqlite] [FEATURE REQUEST] support of %y in strftime()

2012-09-21 Thread LacaK
Hi *, some month ago I wrote question about possibility to add support of %y (2 digit year) to strftime() function. Patch is very simple (only few lines of code) and I hope, that will be useful for many users. Patch by Alexey is here: http://sqlite.mobigroup.ru/wiki?name=2-digit+year+patch

Re: [sqlite] support of %y in strftime()

2012-03-15 Thread LacaK
Hi *, month ago I wrote question about possibility to add support of %y (2 digit year) to strftime() function. Patch is very simple and I hope, that will be useful for many users. Patch by Alexey is here: http://sqlite.mobigroup.ru/wiki?name=2-digit+year+patch (although I think, that it can be

Re: [sqlite] support of %y in strftime()

2012-02-05 Thread LacaK
Looking at patch I do not understand, why we add n += 4; in case of 'y' ? I would do: case 'W': + case 'y': n++; ... +case 'y': { + sqlite3_snprintf(3,[j],"%02d",x.Y % 100); j+=2; + break; +} > See "2-digit year patch" here:

Re: [sqlite] support of %y in strftime()

2012-02-05 Thread LacaK
See "2-digit year patch" here: http://sqlite.mobigroup.ru/wiki?name=patches I did write this becouse 2-digit year number is needed very often for me. Thanks Alexey, As this patch is easy and adds only few lines of source code (but as I think very useful), can it be accepted (merged) into

[sqlite] support of %y in strftime()

2012-02-03 Thread LacaK
Hi *, there is date-time formating function strftime(), which supports some (not all) string formating parameters (like %d, %m, %Y) There is %Y for 4-digit year. Is possible add also %y for 2-digit year ? (like in strftime() in standard C library) If it is not a big problem (I hope, that

Re: [sqlite] storing big numbers into NUMERIC, DECIMAL columns

2011-03-24 Thread LacaK
> User also will probably execute some > queries that do some arithmetic operations on values in that column. > And they will be really surprised to see that not all the data is > numbers there. > > My test shows, that I can successfuly execute queries like (c is NUMERIC column): select c,

Re: [sqlite] storing big numbers into NUMERIC, DECIMAL columns

2011-03-23 Thread LacaK
And...no conversion is performed if you declare the field as text and insert as text. Yes, but I can not affect column type ... FreePascal SQLite3 connector must be able to work with any user database. And when user defines column like NUMERIC or DECIMAL ... so with NUMERIC column affinity,

Re: [sqlite] storing big numbers into NUMERIC, DECIMAL columns

2011-03-23 Thread LacaK
Here are two options which will let you get the contents back to the original precision: A) Store the values as BLOBs. B) Store the value as TEXT, but add a non-digit to the beginning of each number value, for example X24395734857634756.92384729847239842398423964294298473927 Both

Re: [sqlite] storing big numbers into NUMERIC, DECIMAL columns

2011-03-22 Thread LacaK
/ Problem will be solved if SQLite will store such values as text ... so />>/ will behave like this: />>/ 1. is supplied value in TEXT (sqlite3_bind_text) />>/ 2. if yes then try convert this text value into INTEGER or REAL />>/ 3. convert back to text and compare with original value />>/ 4. if

Re: [sqlite] storing big numbers into NUMERIC, DECIMAL columns

2011-03-22 Thread LacaK
If you already have an arbitrary precision number, just encode it to text, save it in sqlite and then decode on the way out. Yes it is possible, but such values (and databases) will not be readable by other database connectors (like for example in PHP etc.) Problem will be solved if SQLite

Re: [sqlite] storing big numbers into NUMERIC, DECIMAL columns

2011-03-22 Thread LacaK
You still don't say what you're planning on doing with these number...just displaying them? Yes may be ... I am working on modification of database component for accessing SQLite3 databases for FreePascal project. We map declared column's types to native freepascal internal field types. So

Re: [sqlite] storing big numbers into NUMERIC, DECIMAL columns

2011-03-22 Thread LacaK
/ So only solution is use TEXT columns (with TEXT affinity) ? There is no />>/ way how to use DECIMAL columns (with NUMERIC affinity) ? />>/ My goal is store numeric values with big precision (as declared per />>/ column DECIMAL(30,7)). / SQLite happily ignores those numbers in parentheses.

Re: [sqlite] storing big numbers into NUMERIC, DECIMAL columns

2011-03-22 Thread LacaK
Hi Michael, thank you for response. So only solution is use TEXT columns (with TEXT affinity) ? There is no way how to use DECIMAL columns (with NUMERIC affinity) ? My goal is store numeric values with big precision (as declared per column DECIMAL(30,7)). I do not want any conversion to

[sqlite] storing big numbers into NUMERIC, DECIMAL columns

2011-03-22 Thread LacaK
Hi, I have table like this: CREATE TABLE tab1 ( a INTEGER, c DECIMAL(30,7), ... ); When I am trying insert values like: INSERT INTO tab1 (a,c) VALUES(1, 123456789123456789.123456); INSERT INTO tab1 (a,c) VALUES(2, '123456789123456789.123456'); values for c column are always rounded or cast

[sqlite] storing big numbers into NUMERIC, DECIMAL columns

2011-03-22 Thread LacaK
Hi, I have table like this: CREATE TABLE tab1 ( a INTEGER, c DECIMAL(30,7), ... ); When I am trying insert values like: INSERT INTO tab1 (a,c) VALUES(1, 123456789123456789.123456); INSERT INTO tab1 (a,c) VALUES(2, '123456789123456789.123456'); values for c column are always rounded or cast to :

Re: [sqlite] Delphi dbExpress driver for SQLite3 ?

2008-04-22 Thread LacaK
Thank you Fred, but I need multi-DB connectivity. User can set up in ini file, which driver use. Hm. -Laco. > Try this: > http://www.aducom.com/sqlite/ > You can dump DBExpress completely. > Fred ___ sqlite-users mailing list

[sqlite] Delphi dbExpress driver for SQLite3 ?

2008-04-22 Thread LacaK
Hi All, I have downloaded dbExpress driver for SQLite3 from http://www.bcp-software.nl/artikelen/sqlite.html When I am using it under Delphi6 (also in Turbo Delphi Explorer) I receive often error "Library used incorrectly" ... I have uploaded reproducible test case (+sources - very simple) at