Re: [sqlite] Datatype for prices (1,500)

2016-12-02 Thread Werner Kleiner
ision you are using in MySQL. > > Your examples would then be stored as 20 or 8 respectively. And every other > possible value you could store in the MySQL you can now store in SQLite, > consistently. > > -- Darren Duncan > > On 2016-12-01 12:08 AM, Werner Kleiner wrote: >>

Re: [sqlite] Datatype for prices (1,500)

2016-12-01 Thread Werner Kleiner
As I can see storing prices is a topic with different ways and different solutions. The advice to store prices in Cent or Integer: Yes you can do: but how will you sore hundredth cents amounts or tenth cent prices? I have prices like 0,0020 or 0,0008 Euro I think I have to manipulate the prices

Re: [sqlite] Datatype for prices (1,500)

2016-11-30 Thread Werner Kleiner
@Simon <: > << All you need to store in the database table is the number. How it is > formatted for viewing or printing is controlled by the user interface. > > yes thats right, but it would be nice to have same behavior between > MySQL and sqlite > I think to use a char datatype is not a good

Re: [sqlite] Datatype for prices (1,500)

2016-11-30 Thread Werner Kleiner
<< All you need to store in the database table is the number. How it is formatted for viewing or printing is controlled by the user interface. yes thats right, but it would be nice to have same behavior between MySQL and sqlite I think to use a char datatype is not a good solution. 2016-11-30

Re: [sqlite] Datatype for prices (1,500)

2016-11-30 Thread Werner Kleiner
<<: > On 30 Nov 2016 at 14:42, Werner Kleiner <sqlitetes...@gmail.com> wrote: > >> Hello, >> there is a small application which uses MYSQL db and can also switch to >> sqlite >> In MySQL a table "prices" has a column "basicprice&qu

[sqlite] Datatype for prices (1,500)

2016-11-30 Thread Werner Kleiner
Hello, there is a small application which uses MYSQL db and can also switch to sqlite In MySQL a table "prices" has a column "basicprice" which is decimal(7,4) I can store a price in form 1.500 there. Same table and same columns in sqlite with datatype float(7,4) stores this value like 1.5 It

Re: [sqlite] Warning automatic index on

2016-10-24 Thread Werner Kleiner
The result is: 2015-05-04 19:13:25 850c11866686a7b39d7b163fb60898c11283688e 2016-10-24 14:28 GMT+02:00 Richard Hipp <d...@sqlite.org>: > Please post the result of the following query: > > SELECT sqlite_source_id(); > > On 10/24/16, Werner Kleiner <sqlitetes...@gma

Re: [sqlite] Warning automatic index on

2016-10-24 Thread Werner Kleiner
I have dropped the double index DROP INDEX 'InternalName'; Then executed the SQL Select statement which caused the sqlite warning. But same warning, nothing changed. Then I added a new index CREATE INDEX idx_installid ON ... Now the sqlite warning is gone away. :-) The SQL statement has a JOIN

[sqlite] Warning automatic index on

2016-10-24 Thread Werner Kleiner
Hello, In an error log there is a message like: SQlite warning (284) automatic index on is_mytable(internalvalue) What does this mean? Can sqlite not use the index correct? How can we check or optimize the index? What do I have to do to cancel the message? Here is the Table DDL: -- Table:

[sqlite] Sqlite db version questions

2016-10-11 Thread Werner Kleiner
Hello, I am a little bit confused about the sqlite db version numbers. 1. On Windows 7 I have created a new db with command sqlite3.exe test.db3 The sqlite3.exe is from date 2013-05-20 and the version number shows 3.7.17 2. Same computer but now I create a db with sqlite3.exe from

Re: [sqlite] Database malformed after 6000 Inserts?

2016-10-04 Thread Werner Kleiner
at is the threading model for > access to the database and how is the native library compiled and configured? > > Jim Borden > (Sent from a mobile device) > >> On 4 Oct 2016, at 19:12, Werner Kleiner <sqlitetes...@gmail.com> wrote: >> >> Hello, >> a program

[sqlite] Database malformed after 6000 Inserts?

2016-10-04 Thread Werner Kleiner
Hello, a program written in C# makes inserts from an SQL script into a sqlite db. We now saw that the database will be malformed after 6000 records. Is there a limitation with huge inserts? What could be the problem? regards Werner ___ sqlite-users

[sqlite] Database is locked

2016-01-15 Thread Werner Kleiner
/16, Werner Kleiner wrote: > > Hello > > I have written a small Wep application with PHP (PDO Apache,). This web > app > > uses a sqlite db3 database. Also there is a Windows application which > uses > > the same database file. > > Now we heard one time that there

[sqlite] Database is locked

2016-01-15 Thread Werner Kleiner
ead of $dbConnection->setAttribute(PDO:: ATTR_TIMEOUT, 60); is this the same? Werner 2016-01-14 16:00 GMT+01:00 Simon Slavin : > > On 14 Jan 2016, at 1:42pm, Werner Kleiner wrote: > > > The windows application is written in C# and uses the > sqlite.systemData.dll. >

[sqlite] Database is locked

2016-01-14 Thread Werner Kleiner
14 Jan 2016, at 10:57am, Werner Kleiner wrote: > > > I have written a small Wep application with PHP (PDO Apache,). This web > app > > uses a sqlite db3 database. Also there is a Windows application which > uses > > the same database file. > > Now we heard one tim

[sqlite] Database is locked

2016-01-14 Thread Werner Kleiner
Hello I have written a small Wep application with PHP (PDO Apache,). This web app uses a sqlite db3 database. Also there is a Windows application which uses the same database file. Now we heard one time that there war a problem and in a log file we saw the error code "Database is locked" My

Re: [sqlite] SQLite Datareader problems with Int?

2014-05-15 Thread Werner Kleiner
What we use is this: System.Data.SQLite System.Data.SQLite Download Page http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki And this is not part of SQLite? -- View this message in context:

Re: [sqlite] SQLite Datareader problems with Int?

2014-05-15 Thread Werner Kleiner
Simon Slavin-3 wrote > There is no need to do anything special. f you use 'Int' in SQLite it > will be interpreted as 'INTEGER' anyway. Yes, but back to my datareader problem it seems that the Datareader differs between a column which is 'INTEGER' or 'Int'. Especially we had a problem with a

Re: [sqlite] SQLite Datareader problems with Int?

2014-05-15 Thread Werner Kleiner
What I mean is: The original MySQL DB has columns with int(10). And the converting tool converts all these columns in SQLite to Int I can change the conversion so that all columns would be INTEGER in SQLite. As I understand for SQLite it is equal if the column is declared as Int or INTEGER? --

Re: [sqlite] General error: 11 malformed database schema - near "'NOCASE'":

2014-05-09 Thread Werner Kleiner
Strange thing is: If I connect to this db with PHPLiteadmin it tells me "No Table in Database" But if I connect on Windows with e.g. Sqlitestudio all is fine. ??? -- View this message in context:

Re: [sqlite] Storing amount?

2014-05-08 Thread Werner Kleiner
Hmm, but would it not be better to store the value 5 as 5.0 , which would be correct for the decimal point instead of 5000.0 ? -- View this message in context: http://sqlite.1065341.n5.nabble.com/Storing-amount-tp75527p75539.html Sent from the SQLite mailing list archive at Nabble.com.

Re: [sqlite] Storing amount?

2014-05-08 Thread Werner Kleiner
>SQLite does not understand column types like "numeric(10,0)". It has only two number types: INTEGER and >REAL. So if the column is datatype REAL and you will store amount 5, SQLite results in 5000.0 ? Why not 5.0 ? And if the columns datatype is REAL, you need a helper tool or script

Re: [sqlite] Storing amount?

2014-05-08 Thread Werner Kleiner
Hello Simon, thanks for help. I use the PDO library. The typeOf results in "real" If I change the "swsalary" column to "numeric(10,0) it results in integer and then the value of 5 ist stored correct without . (dot). So is it better to take datatype "numeric" for storing amounts without dots