Re: [sqlite] Pragma integrity_check takes a lot of time to complete

2010-12-16 Thread Max Vlasov
On Fri, Dec 17, 2010 at 2:47 AM, Richard Hipp wrote: > On Thu, Dec 16, 2010 at 4:12 PM, Marc wrote: > > > application. > > > > And another is it recommended to do a pragma integrity check every time > > that > > our applications is launched? > > > > PRAGMA

Re: [sqlite] Pragma integrity_check takes a lot of time to complete

2010-12-16 Thread Richard Hipp
On Thu, Dec 16, 2010 at 4:12 PM, Marc wrote: > Hello, > > We have an application that runs under windows that use sqlite to store > data. Our application do a pragma integrity_check every time It's launched. > > One of our users have our application with a database of 180 Mb

Re: [sqlite] Pragma integrity_check takes a lot of time to complete

2010-12-16 Thread Max Vlasov
On Fri, Dec 17, 2010 at 12:12 AM, Marc wrote: > > > And another is it recommended to do a pragma integrity check every time > that > our applications is launched? > > to the things Simon wrote I'd add another variant for you. Your program can detect presence of journal file

Re: [sqlite] Troubleshooting...

2010-12-16 Thread john darnell
> -Original Message- > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] > On Behalf Of Pavel Ivanov > Sent: Thursday, December 16, 2010 2:53 PM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] Troubleshooting... > > > Once I bind the

Re: [sqlite] Pragma integrity_check takes a lot of time to complete

2010-12-16 Thread Simon Slavin
On 16 Dec 2010, at 9:12pm, Marc wrote: > We have an application that runs under windows that use sqlite to store > data. Our application do a pragma integrity_check every time It's launched. Why ? If you distrust your platform that much, you probably shouldn't use it at all. > One of our

Re: [sqlite] does sqlite differ between char, varchar and text?

2010-12-16 Thread Simon Slavin
On 16 Dec 2010, at 7:26pm, David Bicking wrote: > Oh, and as I recall, sqlite2 completely ignored the type declaration. It > stored what you typed in the schema, but did nothing with it. True. Only the value stored mattered, and then only for the purposes of comparison and sorting:

[sqlite] Pragma integrity_check takes a lot of time to complete

2010-12-16 Thread Marc
Hello, We have an application that runs under windows that use sqlite to store data. Our application do a pragma integrity_check every time It's launched. One of our users have our application with a database of 180 Mb and It takes about 6 minutes to complete a Pragma integrity_check the first

Re: [sqlite] Troubleshooting...

2010-12-16 Thread Pavel Ivanov
> Once I bind the data to the Insert statement, how can I look at the final > statement to see what I have done wrong when the statement does not work? There's no way to do that. You should print what you bind yourself. For me it looks like you insert into database some UTF-8 string and then try

[sqlite] Troubleshooting...

2010-12-16 Thread john darnell
IAW the SQLite book I purchased, I have incorporated data binding into my “INSERT” statements, but neither of the two most important statements are working…or rather, the first adds a record to the table, but it is mostly junk, looking like this: 4851||x|x|x||2|3|1|10

Re: [sqlite] does sqlite differ between char, varchar and text?

2010-12-16 Thread David Bicking
Oh, and as I recall, sqlite2 completely ignored the type declaration. It stored what you typed in the schema, but did nothing with it. I am pretty sure that sqlite3 treats text, char and varchar completely the same. It ignores the number after char(x) or varchar(x). David --- On Thu,

Re: [sqlite] does sqlite differ between char, varchar and text?

2010-12-16 Thread David Bicking
If I recall correctly, sqlite2 stores everything as text. It doesn't have a concept of affinity. Everythign is text and it will convert anything as needed. David --- On Thu, 12/16/10, Artur Reilin wrote: > From: Artur Reilin > Subject: [sqlite] does

[sqlite] does sqlite differ between char, varchar and text?

2010-12-16 Thread Artur Reilin
Does sqlite differ between char, varchar and text? I currently just always use text. So I wonder if there is any difference if I would use varchar or not. I read that there are differences in mysql, but I know that sqlite has it's type affinity and such. And does it also count for sqlite(2).

Re: [sqlite] assert crash in wal

2010-12-16 Thread Christian Smith
On Thu, Dec 16, 2010 at 09:41:27AM +0200, Yoni Londner wrote: > > > The underlying error here is that you are attempting to use threads in the > > first place. You should never do that. Threads are evil and should be > > avoided wherever possible. Use separate processes for concurrency.

Re: [sqlite] GROUP BY malfunction?

2010-12-16 Thread _ Robal _
Hi there... I did found (working) solution - retrieve all rows off the database with 'order by date asc' and deal with it in php by overwriting $line[$id] variable with every row. Simply as that! It works perfectly (at least for small datasets as I do have - I predict no more than 2k of rows) but

Re: [sqlite] UTF-8

2010-12-16 Thread Afriza N. Arief
@Cory: correct. Fixed Code: HWND hWnd = /* from somewhere */; int nLen = GetWindowTextLength(hWnd) + 1; WCHAR* lpszText = (WCHAR*)malloc(nLen*sizeof(WCHAR)); // std::wstring str; str.resize(nLen); nLen = GetWindowText(hWnd,lpszText,nLen); // str.resize(nLen=GetWindowText(hWnd,[0],nLen));

Re: [sqlite] UTF-8

2010-12-16 Thread Cory Nelson
Just a quick note -- TCHAR is not always UTF-16, and sqlite3_bind_text16 takes a void* so it will happily take whatever you give it. You should be using wchar_t directly instead of TCHAR, so an error can be caught when you use GetWindowText. -- Cory Nelson http://int64.org On Thu, Dec 16, 2010

Re: [sqlite] UTF-8

2010-12-16 Thread Afriza N. Arief
Try this: HWND hWnd = /* from somewhere */; int nLen = GetWindowTextLength(hWnd) + 1; TCHAR* lpszText = (TCHAR*)malloc(nLen*sizeof(TCHAR)); // std::wstring str; str.resize(nLen); nLen = GetWindowText(hWnd,lpszText,nLen); // str.resize(nLen=GetWindowText(hWnd,[0],nLen));

Re: [sqlite] SQL query on sort order

2010-12-16 Thread Jim Morris
If not already done creating a page of additional collations on the wiki would make sense and minimize work all around. > I just mailed you an extension for SQLite offering the collation you need. ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] Is it possible to update the same sqlite table using two different Linux pthread threads?

2010-12-16 Thread Richard Hipp
On Thu, Dec 16, 2010 at 9:19 AM, Igor Tandetnik wrote: > Frank Chang wrote: > > Good morning, If we use the latest version of sqlite, is it possible to > > update the same sqlite table using two different Centos/RedHat Linux > pthread > > threads?

Re: [sqlite] UTF-8

2010-12-16 Thread Pavel Ivanov
> std::string strText = GetWindowsTitle(...); > the GetWindowsTitle occupied sometime with the umlaut. > so how will you do, if you want save std::string into sqlite with keeped > umlaut? My bet would be that GetWindowsTitle (even if it's not GetWindowTitle from Win32 API) returns string to you

Re: [sqlite] UTF-8

2010-12-16 Thread Jonas Sandman
I suggest you try using wchar_t* or std::wstring as std::string is not Unicode afaik. Regards, Jonas On Thu, Dec 16, 2010 at 2:40 PM, Ming Lu wrote: > Hello Martin, > > thank you very much for your suggestion. > > i tried again with the firefox plugin works very well

Re: [sqlite] UTF-8

2010-12-16 Thread Ming Lu
Hello Martin, thank you very much for your suggestion. i tried again with the firefox plugin works very well with the umlaut.(i update the feld with a "ä", it can been shown correctly). in my code: std::string strText = GetWindowsTitle(...); the GetWindowsTitle occupied sometime with the

Re: [sqlite] Is it possible to update the same sqlite table using two different Linux pthread threads?

2010-12-16 Thread Igor Tandetnik
Frank Chang wrote: > Good morning, If we use the latest version of sqlite, is it possible to > update the same sqlite table using two different Centos/RedHat Linux pthread > threads? Yes, but not at the same time. > We are using the same database connection on both

Re: [sqlite] UTF-8

2010-12-16 Thread Martin Engelschalk
Hello Ming, sqlite does nothing to transform data between codepages, and it assumes that data you insert is passed in UTF8. However, sqlite will acept any data and store it. If the firefox plugin does not show you data correctly, then you problably did not pass correct UTF8 to sqlite. Can you

[sqlite] UTF-8

2010-12-16 Thread Ming Lu
Hello everyone, i am faceing a problem with unicode to save german umlaute in sqlite: here ist the problem: dev-envoriment: Visual studio 2008 SQLite 3.6.20 i used the sqlite c/c++ interface and open a db used sqlite3_open. during the running of my application will the german-umlaut or other

Re: [sqlite] Slowdown when switching from Version 3.2.5 to 3.7.4

2010-12-16 Thread Martin Engelschalk
Thank you for your response. I will try and find out things here first, now that I know that the new version should be faster, not slower. If i cannot determine the reason, then i will post my exact schema and statements. Martin Am 16.12.2010 13:19, schrieb Richard Hipp: > On Thu, Dec 16, 2010

Re: [sqlite] Slowdown when switching from Version 3.2.5 to 3.7.4

2010-12-16 Thread Richard Hipp
On Thu, Dec 16, 2010 at 4:01 AM, Martin Engelschalk < engelsch...@codeswift.com> wrote: > Hello List, > > i tried switching from Version 3.2.5 to 3.7.4 to make use of the new > features. > > I create a new database file and load 1.000.000 records into a single > table. > Without changing

[sqlite] Is it possible to update the same sqlite table using two different Linux pthread threads?

2010-12-16 Thread Frank Chang
Good morning, If we use the latest version of sqlite, is it possible to update the same sqlite table using two different Centos/RedHat Linux pthread threads? We are using the same database connection on both pthreads but we always update different rows on each of the two threads. We have run

Re: [sqlite] SQL query on sort order

2010-12-16 Thread Jean-Christophe Deschamps
Harish, >We have a problem with a sql query. >In a table, a column called "name" contains character data that may >include >alpha, numeric and special characters. It is required to sort in such >a way >that names starting with alpha characters are listed first, then numerals >and finally

[sqlite] Slowdown when switching from Version 3.2.5 to 3.7.4

2010-12-16 Thread Martin Engelschalk
Hello List, i tried switching from Version 3.2.5 to 3.7.4 to make use of the new features. I create a new database file and load 1.000.000 records into a single table. Without changing anything in my own code (which reads from a file and does additional processing before inserting the