Re: [sqlite] Converting an sqlite database into format that an Android app can uses?

2017-08-28 Thread J Decker
is redirection so hard? sqlite3 database.db < database.commands On Sun, Aug 27, 2017 at 10:31 PM, Simon Slavin wrote: > > > On 28 Aug 2017, at 6:25am, Csányi Pál wrote: > > > Probe.db is a list of SQL commands, stored as a text file, and not a > >

Re: [sqlite] Converting an sqlite database into format that an Android app can uses?

2017-08-28 Thread Simon Slavin
On 28 Aug 2017, at 7:37am, J Decker wrote: > is redirection so hard? > > sqlite3 database.db < database.commands OP is learning and testing. If redirection doesn’t work, they don’t know what’s wrong. The error messages in interactive mode are far clearer. Once they have

[sqlite] Null pointer cause to crash

2017-08-28 Thread 初佳奇
test on macOS Sierra 10.12.6, with SQLite 3.20.0. Detail: % /tmp/crashes cat crash.sql PRAGMA empty_result_callbacks=1; .dump % /tmp/crashes cat crash.sql |/usr/local/Cellar/sqlite/3.20.0/bin/sqlite3 PRAGMA foreign_keys=OFF; BEGIN TRANSACTION; [1]4726 donecat crash.sql |

Re: [sqlite] My 1st C++ SQLite3 program

2017-08-28 Thread Don V Nielsen
database_name is never assigned a value? In SQLite3_RDB::SQLite3_RDB() it is spelled databese_name? On Sat, Aug 26, 2017 at 10:28 PM, Simon Slavin wrote: > > > On 27 Aug 2017, at 2:34am, Papa wrote: > > > Why do I get this error message? > > Try having

Re: [sqlite] Converting an sqlite database into format that an Android app can uses?

2017-08-28 Thread Csányi Pál
2017-08-28 8:40 GMT+02:00 Simon Slavin : > > > On 28 Aug 2017, at 7:37am, J Decker wrote: > >> is redirection so hard? >> >> sqlite3 database.db < database.commands > > OP is learning and testing. If redirection doesn’t work, they don’t know > what’s

Re: [sqlite] My 1st C++ SQLite3 program

2017-08-28 Thread Igor Korot
Don, On Mon, Aug 28, 2017 at 6:33 AM, Don V Nielsen wrote: > database_name is never assigned a value? In SQLite3_RDB::SQLite3_RDB() it > is spelled databese_name? That is OK. The class member is not used anywhere and the "dxatabese_name" local is used instead. Thank you.

Re: [sqlite] Null pointer cause to crash

2017-08-28 Thread Simon Slavin
On 28 Aug 2017, at 3:33am, 初佳奇 wrote: > test on macOS Sierra 10.12.6, with SQLite 3.20.0. Detail: > % /tmp/crashes cat crash.sql > PRAGMA empty_result_callbacks=1; > .dump > % /tmp/crashes cat crash.sql |/usr/local/Cellar/sqlite/3.20.0/bin/sqlite3 > PRAGMA foreign_keys=OFF; >

Re: [sqlite] Converting an sqlite database into format that an Android app can uses?

2017-08-28 Thread Richard Hipp
On 8/28/17, Csányi Pál wrote: > > When one finished entering SQL commands and used the ".quit" command > to exit the shell tool, then there will be not a text, but a database > file which can then be used on various devices, like smart phones, > etc. > correct -- D.

Re: [sqlite] Converting an sqlite database into format that an Android app can uses?

2017-08-28 Thread Csányi Pál
Hello Simon, 2017-08-28 15:28 GMT+02:00 Simon Slavin : > > On 28 Aug 2017, at 8:13am, Csányi Pál wrote: > >> I attach in this mail the Probe.db file to ask you to see it, whether >> is it really the database, or just a text file? > > This mailing list

Re: [sqlite] Converting an sqlite database into format that an Android app can uses?

2017-08-28 Thread Simon Slavin
On 28 Aug 2017, at 2:50pm, Csányi Pál wrote: > If I open the Probe.db to edit in Midnight Comander, then I find there > one line only, which begin like: > SQLite format 3^@^P^@^A^A^@@ ^@^@^@^B^@^@^@^C^@^@^@^ ... etc... > > So it is definitely a database file and not a

Re: [sqlite] Converting an sqlite database into format that an Android app can uses?

2017-08-28 Thread Simon Slavin
On 28 Aug 2017, at 8:13am, Csányi Pál wrote: > I attach in this mail the Probe.db file to ask you to see it, whether > is it really the database, or just a text file? This mailing list ignores attachments. To see if it’s a database just try to open or type the file. If

Re: [sqlite] How to migrate from UTF-16 to UTF-8

2017-08-28 Thread Warren Young
On Aug 28, 2017, at 9:15 AM, Carsten Müncheberg wrote: > > My goal is to write as few code as possible. How would you do this? Something like this should work: $ sqlite3 my.db .dump | iconv -f utf-16le -t utf-8 | sqlite3 new.db

Re: [sqlite] My 1st C++ SQLite3 program

2017-08-28 Thread Jens Alfke
> On Aug 26, 2017, at 6:34 PM, Papa wrote: > > class SQLite3_RDB { > private: > sqlite3* db; //!< Data Base > std::string database_name; >public: > SQLite3_RDB(); > ~SQLite3_RDB(){sqlite3_close(db); } > }; > SQLite3_RDB::SQLite3_RDB(){

[sqlite] Determine SQLite data type after UDF conversion

2017-08-28 Thread Bart Smissaert
Say I have a query like this: Select tbl, BlobAsText(sample) from sqlite_stat4 Where BlobAsText is a UDF that takes a blob and converts it to a string. Now I need to know that the second column of the output needs to be dealt with as text. Is there any SQLite API that can help me with this?

Re: [sqlite] How to migrate from UTF-16 to UTF-8

2017-08-28 Thread Simon Slavin
On 28 Aug 2017, at 4:15pm, Carsten Müncheberg wrote: > I have a database which is UTF-16 encoded and 80% of its data is strings. To > save disk space and ideally also increase performance, I would like to > migrate it to UTF-8. > > As far as I

Re: [sqlite] C++ sqlite_version()

2017-08-28 Thread Jens Alfke
> On Aug 25, 2017, at 7:56 PM, Papa wrote: > > const std::string& SQLite3_RDB::getSQLiteVersion(){ > tmp = sqlite_version(); > } sqlite_version() is not a function in SQLite itself; is it from some wrapper library you're using? Most likely the crash is in that function.

[sqlite] How to migrate from UTF-16 to UTF-8

2017-08-28 Thread Carsten Müncheberg
Hi, I have a database which is UTF-16 encoded and 80% of its data is strings. To save disk space and ideally also increase performance, I would like to migrate it to UTF-8. As far as I know there is no straight forward way to do this, since you cannot ATTACH a database which has a different

Re: [sqlite] My 1st C++ SQLite3 program

2017-08-28 Thread Papa
Thanks everyone. The problem was resolved by rebooting the computer, strange ain't it? On 2017-08-27 10:55 AM, Tim Streater wrote: On 27 Aug 2017, at 15:35, Papa wrote: First and foremost, I'd like to thank everybody for your replies. Although I have sound knowledge and

Re: [sqlite] My 1st C++ SQLite3 program

2017-08-28 Thread John McKown
On Mon, Aug 28, 2017 at 1:11 PM, Papa wrote: > Thanks everyone. > > The problem was resolved by rebooting the computer, strange ain't it? > ​Ah, yes, the main "solution" to most Windows problems. It's what our desktop ask first - have you rebooted? Yes, and it didn't work? Did

[sqlite] pragma statement not parsing argument as 'numeric-literal'

2017-08-28 Thread john brzustowski
Hi folks, The syntax diagram for the PRAGMA statement here: http://www.sqlite.org/syntaxdiagrams.html#pragma-stmt reaches the "numeric-literal" production for its argument, but the parser doesn't seem to do so: sqlite> PRAGMA busy_timeout=3e+5; 3 ## platform / version: $ uname

Re: [sqlite] Converting an sqlite database into format that anAndroid app can uses?

2017-08-28 Thread ajm
> Mensaje original > De: Csányi Pál > Para: SQLite mailing list > Fecha: Mon, 28 Aug 2017 15:50:13 +0200 > Asunto: Re: [sqlite] Converting an sqlite database into format that > anAndroid app can uses? > >I understand. >If

Re: [sqlite] My 1st C++ SQLite3 program

2017-08-28 Thread Simon Slavin
On 28 Aug 2017, at 7:11pm, Papa wrote: > Thanks everyone. > > The problem was resolved by rebooting the computer, strange ain't it? Congratulations for figuring it out. You will probably never know what was wrong. We’ve all done it. Simon.

Re: [sqlite] My 1st C++ SQLite3 program

2017-08-28 Thread Papa
:-) LOL, yes, that is the gift from MS to the world, LOL. On 2017-08-28 2:20 PM, John McKown wrote: On Mon, Aug 28, 2017 at 1:11 PM, Papa wrote: Thanks everyone. The problem was resolved by rebooting the computer, strange ain't it? ​Ah, yes, the main "solution" to most