[sqlite] Sqlite 2 and Windows 7
On 10 Apr 2015 15:05, "Gabriel Tiste" wrote: > > I updated the faulty column to an empty string and noticed that I could select all records in that table. That must be a sign that something was written to that column that sqlite could not parse. > > Question: > Are there a way to dump the database without any validation or error checking? Can I access the content in the sqlite file somehow to see what really resides in that column that makes it corrupt? > A hex editor? Ketil
[sqlite] Sqlite 2 and Windows 7
On 10 Apr 2015, at 3:09pm, Ketil Froyn wrote: > A hex editor? Unless a page boundary is crossed, the data for one row of a table is all held together in the database file. So if you can find the value of another column in the same row, and search for that using a hex editor, you should find the whole of that row. Simon.
[sqlite] Sqlite 2 and Windows 7
On 10 Apr 2015, at 1:35pm, Gabriel Tiste wrote: > Your assumption regarding versions are not accurate unfortunatly. We are > actually using a sqlite2 database(old application...). Good grief. You need a SQLite2 expert. If you can find one. Sorry I can't help. Simon.
[sqlite] Sqlite 2 and Windows 7
On 10 Apr 2015, at 12:33pm, Gabriel Tiste wrote: > We can do a select on columns but not select * on affected table except the > last column. Including that in the select cause the client to say that table > is missing or logic is not correct. > > Are there any known issues with sqlite2 Are you absolutely positively sure you're using SQLite2 and not SQLite3 ? I'm going to assume you actually mean you're using SQLite3 which was released in 2004. > and windows 7? How can I investigate whats causing this error when I try to > select * from the affected table? Please execute the following: PRAGMA database.integrity_check and give us some idea about what it returns. You can run the command using your own program, or make a copy of the database (on another computer ?) and use the SQLite shell tool. Simon.
[sqlite] Sqlite 2 and Windows 7
I updated the faulty column to an empty string and noticed that I could select all records in that table. That must be a sign that something was written to that column that sqlite could not parse. Question: Are there a way to dump the database without any validation or error checking? Can I access the content in the sqlite file somehow to see what really resides in that column that makes it corrupt? Best regards, GT -Ursprungligt meddelande- Fr?n: sqlite-users-bounces at mailinglists.sqlite.org [mailto:sqlite-users-bounces at mailinglists.sqlite.org] F?r Gabriel Tiste Skickat: den 10 april 2015 14:35 Till: General Discussion of SQLite Database ?mne: Re: [sqlite] Sqlite 2 and Windows 7 Your assumption regarding versions are not accurate unfortunatly. We are actually using a sqlite2 database(old application...). When I use the sqlite.exe tool I got from sqlite.org CMD: sqlite.exe db.sqlite -> PRAGMA integrity_check; I get OK. Is it possible that we have written something to that table that SQL can't handle? Best regards, GT -Ursprungligt meddelande- Fr?n: sqlite-users-bounces at mailinglists.sqlite.org [mailto:sqlite-users-bounces at mailinglists.sqlite.org] F?r Simon Slavin Skickat: den 10 april 2015 14:27 Till: General Discussion of SQLite Database ?mne: Re: [sqlite] Sqlite 2 and Windows 7 On 10 Apr 2015, at 12:33pm, Gabriel Tiste wrote: > We can do a select on columns but not select * on affected table except the > last column. Including that in the select cause the client to say that table > is missing or logic is not correct. > > Are there any known issues with sqlite2 Are you absolutely positively sure you're using SQLite2 and not SQLite3 ? I'm going to assume you actually mean you're using SQLite3 which was released in 2004. > and windows 7? How can I investigate whats causing this error when I try to > select * from the affected table? Please execute the following: PRAGMA database.integrity_check and give us some idea about what it returns. You can run the command using your own program, or make a copy of the database (on another computer ?) and use the SQLite shell tool. Simon. ___ sqlite-users mailing list sqlite-users at mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users at mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Sqlite 2 and Windows 7
Yeah, and most of them are probably retired and sipping umbrella-decorated-drinks by the pool now. :) Thanks anyway. Best regards, GT -Ursprungligt meddelande- Fr?n: sqlite-users-bounces at mailinglists.sqlite.org [mailto:sqlite-users-bounces at mailinglists.sqlite.org] F?r Simon Slavin Skickat: den 10 april 2015 14:39 Till: General Discussion of SQLite Database ?mne: Re: [sqlite] Sqlite 2 and Windows 7 On 10 Apr 2015, at 1:35pm, Gabriel Tiste wrote: > Your assumption regarding versions are not accurate unfortunatly. We are > actually using a sqlite2 database(old application...). Good grief. You need a SQLite2 expert. If you can find one. Sorry I can't help. Simon. ___ sqlite-users mailing list sqlite-users at mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Sqlite 2 and Windows 7
Your assumption regarding versions are not accurate unfortunatly. We are actually using a sqlite2 database(old application...). When I use the sqlite.exe tool I got from sqlite.org CMD: sqlite.exe db.sqlite -> PRAGMA integrity_check; I get OK. Is it possible that we have written something to that table that SQL can't handle? Best regards, GT -Ursprungligt meddelande- Fr?n: sqlite-users-bounces at mailinglists.sqlite.org [mailto:sqlite-users-bounces at mailinglists.sqlite.org] F?r Simon Slavin Skickat: den 10 april 2015 14:27 Till: General Discussion of SQLite Database ?mne: Re: [sqlite] Sqlite 2 and Windows 7 On 10 Apr 2015, at 12:33pm, Gabriel Tiste wrote: > We can do a select on columns but not select * on affected table except the > last column. Including that in the select cause the client to say that table > is missing or logic is not correct. > > Are there any known issues with sqlite2 Are you absolutely positively sure you're using SQLite2 and not SQLite3 ? I'm going to assume you actually mean you're using SQLite3 which was released in 2004. > and windows 7? How can I investigate whats causing this error when I try to > select * from the affected table? Please execute the following: PRAGMA database.integrity_check and give us some idea about what it returns. You can run the command using your own program, or make a copy of the database (on another computer ?) and use the SQLite shell tool. Simon. ___ sqlite-users mailing list sqlite-users at mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Sqlite 2 and Windows 7
We have an application running on Apache 2.2 / PHP and Sqlite 2. Lately we have heard from our customers regarding corrupt sqlite database files. We can't figure out what in our application causing this and suspects that something has happened when customer upgraded and ran our application on Windows 7 instead of Windows XP. We can do a select on columns but not select * on affected table except the last column. Including that in the select cause the client to say that table is missing or logic is not correct. Are there any known issues with sqlite2 and windows 7? How can I investigate whats causing this error when I try to select * from the affected table? Any suggestions are welcome! Best regards, Gabriel Tiste
[sqlite] Sqlite 2 and Windows 7
On 4/10/15, Gabriel Tiste wrote: > We have an application running on Apache 2.2 / PHP and Sqlite 2. Lately we > have heard from our customers regarding corrupt sqlite database files. We > can't figure out what in our application causing this and suspects that > something has happened when customer upgraded and ran our application on > Windows 7 instead of Windows XP. > > We can do a select on columns but not select * on affected table except the > last column. Including that in the select cause the client to say that table > is missing or logic is not correct. > > Are there any known issues with sqlite2 and windows 7? How can I investigate > whats causing this error when I try to select * from the affected table? > We are not aware of any problems. However, development work on sqlite2 stopped before windows7 came out and so sqlite2 was never actually tested on windows7. Sqlite3 was released and sqlite2 went into maintenance-only mode in 2004. The last bug-fix to sqlite2 was in early 2007. Windows7 came out in late 2009. There is a branch in the SQLite source tree for sqlite2. (https://www.sqlite.org/src/timeline?r=version_2&n=all) If you find a problem and submit a patch for Windows7, we'll be happy to check that in for you. -- D. Richard Hipp drh at sqlite.org
Re: [sqlite] Sqlite 2
download url like this http://www.sqlite.org/sqlite-2_x_xx.zip exam:http://www.sqlite.org/sqlite-2_8_17.zip -- View this message in context: http://www.nabble.com/Sqlite-2-tp22944102p25199847.html Sent from the SQLite mailing list archive at Nabble.com. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Sqlite 2
Hello. The EzTools office is closed for 1 week holidays. Will be open again around 17 April. If you have purchase a product, we will process your order then. Sorry for any inconvenience. EzTools Support ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Sqlite 2
Chuvke wrote: > Hello All, > > I need a sqlite 2 windows binary but can't find it on the sqlite site > anywhere. > Anyone know where I can download "sqlite.exe" ? Any v2 will be ok. > I am sure there better ways, but if nothing else comes up, I can email 2.8.17 to you. the zip file is only 133K. Gerry ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Sqlite 2
Hello All, I need a sqlite 2 windows binary but can't find it on the sqlite site anywhere. Anyone know where I can download "sqlite.exe" ? Any v2 will be ok. Thanks in advance! Greetings, chuvke ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] SQLite 2 to SQLite 3 - Varchar sizes
Mitchell Vincent wrote: Fantastic idea, but I'm afraid this will all be on Windows. I'll see about getting a sed-like program to distribute with my converter, though, thanks!! check out http://unxutils.sourceforge.net/ for a Win32 version of sed -- J. Scott Wilkinson - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] SQLite 2 to SQLite 3 - Varchar sizes
On 3/9/07, Scott Hess <[EMAIL PROTECTED]> wrote: On 3/9/07, Mitchell Vincent <[EMAIL PROTECTED]> wrote: > I'm looking into ways of changing the schema type name when I do my > SQLite2->SQLite3 conversion. Most likely I'll have to pipe the .dump > from the SQLite2 db through a program to replace 'varchar' with > 'text'... I'm working on that now! You could also write something to spelunk through the metadata and alter things to fit. Use 'pragma table_info(table)' to get info about the table, then for each table you want to change, within a transaction create a new table just like the old table with the appropriate changes, use insert-from-select syntax to move the data to the new table, delete the old table, rename the new table to the old name, and commit the transaction. This might not be much fun if your database is very very large, though. Hmmm.. That's not a bad idea. I could do that all in-code. I'm using the ODBC driver to access the SQLite database but I guess that's no big deal. I'd say the biggest database will be in the 30-50 meg range. They're not huge (unless 30 meg is considered huge.. eek..) Thanks!! -- - Mitchell Vincent - K Software - Innovative Software Solutions - Visit our website and check out our great software! - http://www.ksoftware.net - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] SQLite 2 to SQLite 3 - Varchar sizes
On 3/9/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: If you don't have the word varchar anyplace else, e.g. in your data, you can simply do: sqlite OLD.DB .dump | sed 's/varchar/text/' | sqlite3 NEW.DB If the word varchar may exist elsewhere, or be in various cases (VARCHAR, Varchar, etc.), you'll have to be a bit more creative. "awk" may be your friend. Derrell Fantastic idea, but I'm afraid this will all be on Windows. I'll see about getting a sed-like program to distribute with my converter, though, thanks!! -- - Mitchell Vincent - K Software - Innovative Software Solutions - Visit our website and check out our great software! - http://www.ksoftware.net - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] SQLite 2 to SQLite 3 - Varchar sizes
On 3/9/07, Mitchell Vincent <[EMAIL PROTECTED]> wrote: I'm looking into ways of changing the schema type name when I do my SQLite2->SQLite3 conversion. Most likely I'll have to pipe the .dump from the SQLite2 db through a program to replace 'varchar' with 'text'... I'm working on that now! You could also write something to spelunk through the metadata and alter things to fit. Use 'pragma table_info(table)' to get info about the table, then for each table you want to change, within a transaction create a new table just like the old table with the appropriate changes, use insert-from-select syntax to move the data to the new table, delete the old table, rename the new table to the old name, and commit the transaction. This might not be much fun if your database is very very large, though. -scott - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] SQLite 2 to SQLite 3 - Varchar sizes
"Mitchell Vincent" <[EMAIL PROTECTED]> writes: > I have an old SQLite 2.8 database that shared it's schema with > PostgreSQL. One of the nifty things about PostgreSQL (that admittedly > has me spoiled) is the ability to just say "varchar" without any > length specifier. > > Specifying "varchar" in SQLite works great - no problem at all. Until > I tried to use it with ODBC. The SQLite ODBC driver works fine but > assumes a 255 character limit. As soon as it returns a result longer > than 255 it blows an error. > > I see in the SQLite ODBC driver's documentation that it does support > > 255 varchar fields but I _assume_ have to specify that it's > 255 in > the schema. > > Now comes the fun part. I'm converting these databases (and there are > a LOT of them), I'm doing "sqlite OLD.DB .dump | sqlite3 NEW.DB" which > works flawlessly. Is there any way to change the schema on the fly to > say "Varchar(1024)" instead of just "varchar" (or just use an SQLite > 'type' of "text") ? If you don't have the word varchar anyplace else, e.g. in your data, you can simply do: sqlite OLD.DB .dump | sed 's/varchar/text/' | sqlite3 NEW.DB If the word varchar may exist elsewhere, or be in various cases (VARCHAR, Varchar, etc.), you'll have to be a bit more creative. "awk" may be your friend. Derrell - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] SQLite 2 to SQLite 3 - Varchar sizes
On 3/9/07, Christian Werner <[EMAIL PROTECTED]> wrote: Mitchell Vincent wrote: > > I have an old SQLite 2.8 database that shared it's schema with > PostgreSQL. One of the nifty things about PostgreSQL (that admittedly > has me spoiled) is the ability to just say "varchar" without any > length specifier. > > Specifying "varchar" in SQLite works great - no problem at all. Until > I tried to use it with ODBC. The SQLite ODBC driver works fine but > assumes a 255 character limit. As soon as it returns a result longer > than 255 it blows an error. > > I see in the SQLite ODBC driver's documentation that it does support > > 255 varchar fields but I _assume_ have to specify that it's > 255 in > the schema. > > Now comes the fun part. I'm converting these databases (and there are > a LOT of them), I'm doing "sqlite OLD.DB .dump | sqlite3 NEW.DB" which > works flawlessly. Is there any way to change the schema on the fly to > say "Varchar(1024)" instead of just "varchar" (or just use an SQLite > 'type' of "text") ? Mitchell, the artificial limitation of VARCHAR columns to 255 chars in the SQLite ODBC drivers is yet another tribute to M$ACCE$$. If you want a proper untruncated mapping to larger VARCHAR columns use "text" or "memo" in your CREATE TABLE statement. These will be mapped to SQL_LONGVARCHAR by the drivers. Sorry for that inconvenience, but blame billg, not me ;-) Regards, Christian Thanks Christian! I never meant to blame you at all - I figured the assumed 255 char limit was there for good reason! I should have created better schema anyway. I'm looking into ways of changing the schema type name when I do my SQLite2->SQLite3 conversion. Most likely I'll have to pipe the .dump from the SQLite2 db through a program to replace 'varchar' with 'text'... I'm working on that now! -- - Mitchell Vincent - K Software - Innovative Software Solutions - Visit our website and check out our great software! - http://www.ksoftware.net - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] SQLite 2 to SQLite 3 - Varchar sizes
Mitchell Vincent wrote: > > I have an old SQLite 2.8 database that shared it's schema with > PostgreSQL. One of the nifty things about PostgreSQL (that admittedly > has me spoiled) is the ability to just say "varchar" without any > length specifier. > > Specifying "varchar" in SQLite works great - no problem at all. Until > I tried to use it with ODBC. The SQLite ODBC driver works fine but > assumes a 255 character limit. As soon as it returns a result longer > than 255 it blows an error. > > I see in the SQLite ODBC driver's documentation that it does support > > 255 varchar fields but I _assume_ have to specify that it's > 255 in > the schema. > > Now comes the fun part. I'm converting these databases (and there are > a LOT of them), I'm doing "sqlite OLD.DB .dump | sqlite3 NEW.DB" which > works flawlessly. Is there any way to change the schema on the fly to > say "Varchar(1024)" instead of just "varchar" (or just use an SQLite > 'type' of "text") ? Mitchell, the artificial limitation of VARCHAR columns to 255 chars in the SQLite ODBC drivers is yet another tribute to M$ACCE$$. If you want a proper untruncated mapping to larger VARCHAR columns use "text" or "memo" in your CREATE TABLE statement. These will be mapped to SQL_LONGVARCHAR by the drivers. Sorry for that inconvenience, but blame billg, not me ;-) Regards, Christian - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] SQLite 2 to SQLite 3 - Varchar sizes
On 3/9/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: "Mitchell Vincent" <[EMAIL PROTECTED]> wrote: > > Now comes the fun part. I'm converting these databases (and there are > a LOT of them), I'm doing "sqlite OLD.DB .dump | sqlite3 NEW.DB" which > works flawlessly. Is there any way to change the schema on the fly to > say "Varchar(1024)" instead of just "varchar" (or just use an SQLite > 'type' of "text") ? > Do "sqlite OLD.DB .dump >temp.sql" Bring up temp.sql in a text editor. Find the CREATE TABLE statements. Modify the column types to be whatever you want. Save the file. Then do "sqlite3 NEW.DB Thank you! This is something that would be part of an automatic conversion process that would happen if a user opened a database in the old format. I'm curious to know if there is an option to have schema converted to the main SQLite 'types' instead of just keeping whatever type name was assigned (varchar, in my example, would just be TEXT I think). I just thought about putting another step in the process.. sqlite OLD.DB .dump > program_search_replace > temp.sql program_search_replace would just be something I'd write to string replace "varchar" with "varchar(1024)" and print the modified string directly back out. I'm not sure how the output redirection feeds the data into the program but I'll go off and look that up! -- - Mitchell Vincent - K Software - Innovative Software Solutions - Visit our website and check out our great software! - http://www.ksoftware.net - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] SQLite 2 to SQLite 3 - Varchar sizes
"Mitchell Vincent" <[EMAIL PROTECTED]> wrote: > > Now comes the fun part. I'm converting these databases (and there are > a LOT of them), I'm doing "sqlite OLD.DB .dump | sqlite3 NEW.DB" which > works flawlessly. Is there any way to change the schema on the fly to > say "Varchar(1024)" instead of just "varchar" (or just use an SQLite > 'type' of "text") ? > Do "sqlite OLD.DB .dump >temp.sql" Bring up temp.sql in a text editor. Find the CREATE TABLE statements. Modify the column types to be whatever you want. Save the file. Then do "sqlite3 NEW.DB - To unsubscribe, send email to [EMAIL PROTECTED] -
[sqlite] SQLite 2 to SQLite 3 - Varchar sizes
I have an old SQLite 2.8 database that shared it's schema with PostgreSQL. One of the nifty things about PostgreSQL (that admittedly has me spoiled) is the ability to just say "varchar" without any length specifier. Specifying "varchar" in SQLite works great - no problem at all. Until I tried to use it with ODBC. The SQLite ODBC driver works fine but assumes a 255 character limit. As soon as it returns a result longer than 255 it blows an error. I see in the SQLite ODBC driver's documentation that it does support > 255 varchar fields but I _assume_ have to specify that it's > 255 in the schema. Now comes the fun part. I'm converting these databases (and there are a LOT of them), I'm doing "sqlite OLD.DB .dump | sqlite3 NEW.DB" which works flawlessly. Is there any way to change the schema on the fly to say "Varchar(1024)" instead of just "varchar" (or just use an SQLite 'type' of "text") ? -- - Mitchell Vincent - K Software - Innovative Software Solutions - Visit our website and check out our great software! - http://www.ksoftware.net - To unsubscribe, send email to [EMAIL PROTECTED] -