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:
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.
-
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
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
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
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
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:
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
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
> 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,
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,
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
/ 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
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
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
/ 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.
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
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
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 :
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
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
21 matches
Mail list logo