[sqlite] UPDATE Problem

2015-03-12 Thread Peter Haworth
Thanks to all for explaining my confusion. The printf solution seems like the best way to handle this since I don't need to worry about how many decimal places are in the number.

[sqlite] UPDATE Problem

2015-03-12 Thread R.Smith
On 2015-03-12 01:27 AM, Peter Haworth wrote: > I have a table, Transactions, with a column , Value, of type NUMERIC. The > Value column is supposed to have 2 decimal places in all rows but some have > only one. SQLite has no formatting inherent to the column value, there is no such thing as

[sqlite] UPDATE Problem

2015-03-12 Thread Dinu Marina
Hi Peter, From https://www.sqlite.org/datatype3.html: "When text data is inserted into a NUMERIC column, the storage class of the text is converted to INTEGER or REAL (in order of preference) if such conversion is lossless and reversible"; basically any fraction you insert into a NUMERIC

[sqlite] UPDATE Problem

2015-03-12 Thread Peter Haworth
I have a table, Transactions, with a column , Value, of type NUMERIC. The Value column is supposed to have 2 decimal places in all rows but some have only one. To correct this I issued the following command: UPDATE Transactions SET Value=Value||0 WHERE substr(Value,-2,1)='.' No errors on

[sqlite] UPDATE Problem

2015-03-11 Thread Keith Medcalf
ge- >From: sqlite-users-bounces at mailinglists.sqlite.org [mailto:sqlite-users- >bounces at mailinglists.sqlite.org] On Behalf Of Peter Haworth >Sent: Wednesday, 11 March, 2015 17:28 >To: sqlite-users at mailinglists.sqlite.org >Subject: [sqlite] UPDATE Problem > >I hav

Re: [sqlite] Update problem with Sqlite (one PC one single operation) Vb.net

2012-04-08 Thread Larry Brasfield
On April 8, Marco wrote: OpenConnection(TMP_ConnectionString, OBJ_Connection) sql= "UPDATE ANG_Operatori Set NomeOperatore = 'Amministratore',UserID = 'admin',ParolaChiave = 'prova',DataUltimoAccesso = '08/04/2012 15:04:00',Supervisore = 1,ID_Dentista = 1 where ID_ANG_Operatore = 1"

Re: [sqlite] Update problem with Sqlite (one PC one single operation) Vb.net

2012-04-08 Thread marco1
Hi Simon , Thank you for your fast reply: SO: Windows 7. VB.net 2010 // OpenConnection(TMP_ConnectionString, OBJ_Connection) sql= "UPDATE ANG_Operatori Set NomeOperatore = 'Amministratore',UserID = 'admin',ParolaChiave = 'prova',DataUltimoAccesso = '08/04/2012 15:04:00',Supervisore =

Re: [sqlite] Update problem with Sqlite (one PC one single operation) Vb.net

2012-04-08 Thread Simon Slavin
On 8 Apr 2012, at 2:32pm, marco1 wrote: > Hi , I don't know how is possible save record with Sqlite. > > I was try i different way: > > 1) With vb.net updatecommand (The database file is locked) > 2) With "Insert Into" (The database file is locked) > 3) With

[sqlite] Update problem with Sqlite (one PC one single operation) Vb.net

2012-04-08 Thread marco1
Hi , I don't know how is possible save record with Sqlite. I was try i different way: 1) With vb.net updatecommand (The database file is locked) 2) With "Insert Into" (The database file is locked) 3) With transaction Begin . Commit (The database file is locked) This message is false

Re: [sqlite] Update problem in use C/C++ interface

2010-03-26 Thread Pavel Ivanov
> and i'm sure there is a record with the ID bind for the third parameter. You should be also sure that this record contains ID as an integer value, not as text value. Without affinity integer will never be equal to text. Pavel 2010/3/24 王志刚 : > ??? wrote: >> Hi, I

Re: [sqlite] Update problem in use C/C++ interface

2010-03-24 Thread 王志刚
??? wrote: > Hi, I meet a problem in use c/c++ API to update a row in table. > all return value means the operate is successful, But the row have no > change at all. How do you determine this? > the main code al follow: > >wstring sql = L"UPDATE Mail SET [Content] = ?1 [CurrentSize] = ?2 >

Re: [sqlite] Update problem in use C/C++ interface

2010-03-24 Thread Igor Tandetnik
王志刚 wrote: > Hi, I meet a problem in use c/c++ API to update a row in table. > all return value means the operate is successful, But the row have no > change at all. How do you determine this? > the main code al follow: > >wstring sql = L"UPDATE Mail SET [Content] = ?1 [CurrentSize] = ?2 >

[sqlite] Update problem in use C/C++ interface

2010-03-24 Thread 王志刚
Hi, I meet a problem in use c/c++ API to update a row in table. all return value means the operate is successful, But the row have no change at all. and the INSERT , SELECT operation is OK. I think maybe I'm not first one meet this problem.But I can't visit the archive. So if anyone here know

Re: [sqlite] UPDATE problem.

2009-11-22 Thread Igor Tandetnik
lilezek wrote: > Hi. I'm using SQLite in my own c++ aplication. Everything works except if I > try to do this query: > > UPDATE rnc_accounts SET lastip = '127.0.0.1' WHERE name = 'lilezek'; > > But when I do step I got always 5 (SQLITE_BUSY). You'll think the problem is > mine, but I change

[sqlite] UPDATE problem.

2009-11-22 Thread lilezek
Hi. I'm using SQLite in my own c++ aplication. Everything works except if I try to do this query: UPDATE rnc_accounts SET lastip = '127.0.0.1' WHERE name = 'lilezek'; But when I do step I got always 5 (SQLITE_BUSY). You'll think the problem is mine, but I change the query to the next one: