Re: [sqlite] sqlite3_step getting core dumbed.

2012-02-09 Thread bhaskarReddy
PRAGMA table_info(yourtablename); will display colNumber, colName, colType, ex: 0|slotId|INTEGER|0||0 1|ponChannelId|INTEGER|0||0 2|onuType|INTEGER|0||0 3|onuSerialNumber|TEXT|0||0 4|onuId|INTEGER|0||0 5|plannedSwVersion|TEXT|0||0 6|adminStatus|INTEGER|0||0 In that how can we extract

Re: [sqlite] Compiling SQLite3 to run on Windows Mobile 6.5

2012-02-09 Thread Random Coder
On Thu, Feb 9, 2012 at 2:34 PM, Tim Leland wrote: > I can use CE if that's the problem. Can someone get sqlite3.exe shell to run > on windows CE? I'm sure someone can, but they'll need to know which architecture you're running on, and possibly what CE components are in

Re: [sqlite] Compiling SQLite3 to run on Windows Mobile 6.5

2012-02-09 Thread Tim Leland
I can use CE if that's the problem. Can someone get sqlite3.exe shell to run on windows CE? -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Random Coder Sent: Thursday, February 09, 2012 2:51 PM To: General Discussion of

Re: [sqlite] Explanation

2012-02-09 Thread Puneet Kishor
On Feb 9, 2012, at 4:17 PM, Marco Bambini wrote: > sqlite 3.7.8 on MacOS X > > This query works fine: > SELECT rowid, * FROM 'customer' WHERE rowid < 100; > > While this query does not return anything: > SELECT rowid, * FROM 'customer' WHERE 'rowid' < 100; > > Do you have an explanation?

[sqlite] Explanation

2012-02-09 Thread Marco Bambini
sqlite 3.7.8 on MacOS X This query works fine: SELECT rowid, * FROM 'customer' WHERE rowid < 100; While this query does not return anything: SELECT rowid, * FROM 'customer' WHERE 'rowid' < 100; Do you have an explanation? -- Marco Bambini http://www.sqlabs.com http://twitter.com/sqlabs

Re: [sqlite] Compiling SQLite3 to run on Windows Mobile 6.5

2012-02-09 Thread Black, Michael (IS)
Let's change them a touch...one too many @'s in loop.bat loop.bat @for %%i in (%1) do @call dump %%i dump.bat @echo .separator "," >grocery.sql @echo .output %~n1.csv >>grocery.sql @echo select * from grocery; >>grocery.sql @echo .quit >>grocery.sql @sqlite3 %1 grocery.sql echo .output

Re: [sqlite] Compiling SQLite3 to run on Windows Mobile 6.5

2012-02-09 Thread Random Coder
On Thu, Feb 9, 2012 at 10:17 AM, Tim Leland wrote: > Ok now I understand. I need the shell for windows mobile. The reason why im > doing this is the application running on windows mobile is really just an > html5 browser storing data in a sqlite database. I need to

[sqlite] Elegant printout of table (with header) via TCL

2012-02-09 Thread rod
My apologies if this question should be directed to some other list. I'm looking for a better way to printout the: Column Headers, followed by the table contents - in comma separated value (csv) format from a SELECT statement: So far I have two solutions, neither seems elegant enough. First

Re: [sqlite] Compiling SQLite3 to run on Windows Mobile 6.5

2012-02-09 Thread Tim Leland
Haha ya Im "that guy". Ive tried to create these .bat files and they don't seem to do anything. Here they are: Two batch files will do it. loop.bat @for %%i in (%1) do @call @dump %%i dump.bat echo .separator "," >grocery.sql echo .output %~n1.csv >>grocery.sql echo select * from grocery;

Re: [sqlite] Query on Sqlite3 in an Android app

2012-02-09 Thread Tim Streater
On 09 Feb 2012 at 15:40, Lavanya Ramanan wrote: > And I would also like to know what GUI do people generally use for sqlite > database. Navicat for SQLite Lite, although I rarely need to use it. Very occasionally I want to see the hex of some database column. --

Re: [sqlite] Compiling SQLite3 to run on Windows Mobile 6.5

2012-02-09 Thread noel.frankinet
Le 9/02/2012 19:07, Tim Leland a écrit : you certainly don't need the shell, sqlite is just a (static) library. Noël What software would I need to compile? -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Random Coder Sent:

Re: [sqlite] Compiling SQLite3 to run on Windows Mobile 6.5

2012-02-09 Thread Simon Slavin
On 9 Feb 2012, at 6:28pm, Tim Leland wrote: > That will work but we have to import the sqlite file into our AS400/Iseries > IBM (DB2)system. Easiest way is convert it to a .csv file for the import. My > last resort is just run a script on the PC side that will run sqlite3.exe > shell and convert

Re: [sqlite] Cannot insert/retrieve 8 byte integers without losing digits

2012-02-09 Thread Simon Slavin
On 9 Feb 2012, at 5:42pm, yesnid wrote: > CREATE TABLE IF NOT EXISTS Exports (id varchar(50) PRIMARY > KEY NOT NULL,start_time integer,end_time > integer,data_source_id varchar(50),format > integer,percent_completeinteger,size

Re: [sqlite] Compiling SQLite3 to run on Windows Mobile 6.5

2012-02-09 Thread Tim Leland
That will work but we have to import the sqlite file into our AS400/Iseries IBM (DB2)system. Easiest way is convert it to a .csv file for the import. My last resort is just run a script on the PC side that will run sqlite3.exe shell and convert the sqlite file to a .csv but I want to avoid that

Re: [sqlite] Compiling SQLite3 to run on Windows Mobile 6.5

2012-02-09 Thread Simon Slavin
On 9 Feb 2012, at 6:17pm, Tim Leland wrote: > Ok now I understand. I need the shell for windows mobile. The reason why im > doing this is the application running on windows mobile is really just an > html5 browser storing data in a sqlite database. I need to convert the > sqlite database to a

Re: [sqlite] Compiling SQLite3 to run on Windows Mobile 6.5

2012-02-09 Thread Tim Leland
Ok now I understand. I need the shell for windows mobile. The reason why im doing this is the application running on windows mobile is really just an html5 browser storing data in a sqlite database. I need to convert the sqlite database to a .csv file and send that file to a ftp server. Any ideas

Re: [sqlite] Compiling SQLite3 to run on Windows Mobile 6.5

2012-02-09 Thread Random Coder
On Thu, Feb 9, 2012 at 10:07 AM, Tim Leland wrote: > What software would I need to compile? Persumably whatever software you're using to compile the rest of your application. Visual Studio is the common way to compile Windows Mobile applications. SQLite is a library

Re: [sqlite] Compiling SQLite3 to run on Windows Mobile 6.5

2012-02-09 Thread Tim Leland
What software would I need to compile? -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Random Coder Sent: Thursday, February 09, 2012 1:06 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] Compiling SQLite3 to

Re: [sqlite] Compiling SQLite3 to run on Windows Mobile 6.5

2012-02-09 Thread Random Coder
On Thu, Feb 9, 2012 at 9:57 AM, Tim Leland wrote: > Ok so what would be the process of compiling the c#? Ive never done anything > like that before. Unless you have a need for the C# library, you should skip it. Just bring in the C source file and header from the

Re: [sqlite] Cannot insert/retrieve 8 byte integers without losing digits

2012-02-09 Thread Noah Hart
May be in your program; From the 3.7.10 shell sqlite> select id, start_time from exports; d006dacf-3134-45b6-828b-0860738e4029|1311178875028 sqlite> select id, cast(start_time as integer) from exports; d006dacf-3134-45b6-828b-0860738e4029|1311178875028 sqlite> What version are you running?

Re: [sqlite] Compiling SQLite3 to run on Windows Mobile 6.5

2012-02-09 Thread Tim Leland
Ok so what would be the process of compiling the c#? Ive never done anything like that before. -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Jim Morris Sent: Thursday, February 09, 2012 12:44 PM To: sqlite-users@sqlite.org

Re: [sqlite] Cannot insert/retrieve 8 byte integers without losing digits

2012-02-09 Thread Black, Michael (IS)
Is this from inside your application? Works fine from the shell which makes me think you're truncating your value in your program. SQLite version 3.7.9 2011-11-01 00:52:41 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite> CREATE TABLE IF NOT EXISTS Exports

Re: [sqlite] Query on Sqlite3 in an Android app

2012-02-09 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/02/12 07:40, Lavanya Ramanan wrote: > So I can use an excel/csv file as input to the content provider? Where > do I place the file? You write the content provider code so it can do whatever you want. If you only need sequential read then it

Re: [sqlite] Compiling SQLite3 to run on Windows Mobile 6.5

2012-02-09 Thread Jim Morris
Sorry, no. SQLite is embedded in our application and requires authentication and sync to server before you can get off the login page. On 2/9/2012 9:33 AM, Tim Leland wrote: Is the sqlite part separate or emended in the application? Is it possible to just send me the .exe and test it on the

Re: [sqlite] Cannot insert/retrieve 8 byte integers without losing digits

2012-02-09 Thread yesnid
Hello Simon, Here is my create: CREATE TABLE IF NOT EXISTS Exports (id varchar(50) PRIMARY KEY NOT NULL,start_time integer,end_time integer,data_source_id varchar(50),format integer,percent_completeinteger,size

Re: [sqlite] Compiling SQLite3 to run on Windows Mobile 6.5

2012-02-09 Thread Tim Leland
Is the sqlite part separate or emended in the application? Is it possible to just send me the .exe and test it on the scan gun? -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Jim Morris Sent: Thursday, February 09, 2012 12:22

Re: [sqlite] Compiling SQLite3 to run on Windows Mobile 6.5

2012-02-09 Thread Jim Morris
Don't know about those devices but we use the MC55A and related device without issue with C++ and I'm pretty sure they support C#. http://www.motorola.com/Business/US-EN/Business+Product+and+Services/Mobile+Computers/Handheld+Computers/MC55A0 On 2/9/2012 9:24 AM, Richard Hipp wrote: On Thu,

Re: [sqlite] Compiling SQLite3 to run on Windows Mobile 6.5

2012-02-09 Thread Richard Hipp
On Thu, Feb 9, 2012 at 12:21 PM, Noah Hart wrote: > > The C#-SQLite port at http://code.google.com/p/csharp-sqlite/ supports > both > Silverlight and Windows Phone > Tim tells me that he needs it to run on a handheld barcode scanner (

Re: [sqlite] Compiling SQLite3 to run on Windows Mobile 6.5

2012-02-09 Thread Jim Morris
It will definitely run. Pelles is new to me. Our application uses SQLite 3.5.9 on WinCE 4.2 through 6.5 using C++. I don't recall that we had to change any source, but we did modify the shell for better input handling, but there were probably some compiler flags we needed to set. Been

Re: [sqlite] Compiling SQLite3 to run on Windows Mobile 6.5

2012-02-09 Thread Noah Hart
The C#-SQLite port at http://code.google.com/p/csharp-sqlite/ supports both Silverlight and Windows Phone Hope that help, Noah Hart Tim Leland wrote: > > Does anyone have any tips/suggestions for getting sqlite3 to run on > windows > mobile 6.5? > > > > Thanks > > > > Tim Leland >

Re: [sqlite] Cannot insert/retrieve 8 byte integers without losing digits

2012-02-09 Thread Richard Hipp
On Thu, Feb 9, 2012 at 11:58 AM, yesnid wrote: > > Hello Richard, > > I am having a similar issue, I am trying to store a 13 digit value in my > table and it is being converted to a 10 digit value? Is there something > that > I need to do, to enable the 8 byte values for

Re: [sqlite] Cannot insert/retrieve 8 byte integers without losing digits

2012-02-09 Thread Simon Slavin
On 9 Feb 2012, at 4:58pm, yesnid wrote: > I am having a similar issue, I am trying to store a 13 digit value in my > table and it is being converted to a 10 digit value? Is there something that > I need to do, to enable the 8 byte values for integer? What type have you defined that column in

[sqlite] Problem and possible Optimiziation with LOOKASIDE buffer

2012-02-09 Thread Scholz Maik (CM-AI/PJ-CF42)
Hi, I am working on an embedded application using SQLite. My lookaside configuration: sqlite3_db_config(mydbhandle, SQLITE_DBCONFIG_LOOKASIDE, 0, 64, 128); After doing some profiling, I saw that sqlite3DbMallocRaw does not allocate

Re: [sqlite] Cannot insert/retrieve 8 byte integers without losing digits

2012-02-09 Thread yesnid
Hello Richard, I am having a similar issue, I am trying to store a 13 digit value in my table and it is being converted to a 10 digit value? Is there something that I need to do, to enable the 8 byte values for integer? Thank you, Richard Hipp-3 wrote: > > On Tue, Jan 31, 2012 at 4:32 PM,

Re: [sqlite] Compiling SQLite3 to run on Windows Mobile 6.5

2012-02-09 Thread Tim Leland
Found this site. Anyone have any experience using this? http://www.smorgasbordet.com/pellesc/ -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Tim Leland Sent: Thursday, February 09, 2012 11:48 AM To: 'General Discussion of

[sqlite] Compiling SQLite3 to run on Windows Mobile 6.5

2012-02-09 Thread Tim Leland
Does anyone have any tips/suggestions for getting sqlite3 to run on windows mobile 6.5? Thanks Tim Leland W. Lee Flowers & Co. 127 E. W Lee Flowers Rd. Scranton, S.C. 29591 (843)389-2731 ___ sqlite-users mailing list

Re: [sqlite] .output Question

2012-02-09 Thread Black, Michael (IS)
Two batch files will do it. loop.bat @for %%i in (%1) do @call @dump %%i dump.bat echo .separator "," >grocery.sql echo .output %~n1.csv >>grocery.sql echo select * from grocery; >>grocery.sql echo .quit >>grocery.sql sqlite3 %1 > test1.csv Test2.db >> test2.csv Test3.db >> test3.csv

Re: [sqlite] Query on Sqlite3 in an Android app

2012-02-09 Thread Lavanya Ramanan
So I can use an excel/csv file as input to the content provider? Where do I place the file? And I would also like to know what GUI do people generally use for sqlite database. Thanks. Lavanya On Fri, Jan 27, 2012 at 1:57 PM, Lavanya Ramanan wrote: > > > --

Re: [sqlite] sqlite] .output Question

2012-02-09 Thread Tim Leland
Maybe I wasn't clear or I don't understand. Im using windows powershell to loop through a folder with multiple ".db" files. I want them to be named correctly. For ex. Test1.db >> test1.csv Test2.db >> test2.csv Test3.db >> test3.csv .separator "," .output "orginal DB file name" + .csv select

Re: [sqlite] Page cache block size problem

2012-02-09 Thread Richard Hipp
On Thu, Feb 9, 2012 at 5:45 AM, Jaco Breitenbach wrote: > With 3.7.10 > sqlite_status(SQLITE_STATUS_PAGECACHE_SIZE) now returns 1312 bytes, > indicating a page cache header size of 288 bytes. This means that once > again my application is not using the preallocated

Re: [sqlite] Inserts get slower and slower

2012-02-09 Thread Black, Michael (IS)
I think you may find you're running into buffer cache limits (not sqlite but OS limits). So the 1st third all fits into buffer cache. Once it starts committing to disk things slow down a LOT. Since you're not showing an real times it's hard to say you are any slower than anybody else.

Re: [sqlite] Slow inserts in indexed table

2012-02-09 Thread Valentin Davydov
On Thu, Feb 09, 2012 at 02:05:53PM +, Simon Slavin wrote: > > On 9 Feb 2012, at 1:45pm, Valentin Davydov wrote: > > > CREATE TABLE T(X, Y, Z, ..., UNIQUE (X, Y, Z, ...) ON CONFLICT IGNORE); > > CREATE INDEX IX ON T(X); > > CREATE INDEX IY ON T(Y); > > CREATE INDEX IZ ON T(Z); > > . > >

Re: [sqlite] sqlite] .output Question

2012-02-09 Thread Black, Michael (IS)
echo .separator "," >grocery.sql echo .output %filename% >>grocery.sql echo select * from grocery; >>grocery.sql echo .quit >>grocery.sql sqlite3 grocery.db http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list

Re: [sqlite] Inserts get slower and slower

2012-02-09 Thread Don V Nielsen
I've noticed a similar thing happening. The first 1/3rd loads quickly; the remain 2/3rds stagnates. It appears that there is some kind of bottleneck happening. I thought it was the SAN. My application begins a transaction, does all its inserts, and then commits. There could be millions in the

[sqlite] .output Question

2012-02-09 Thread Tim Leland
Im using sqlite3.exe to convert my database to .csv file. Here are the commands Im passing to sqlite3. .separator "," .output text.csv select * from grocery; .quit How can I get .output txt.csv to be %filename%.csv thanks Tim Leland W. Lee Flowers & Co. 127 E. W Lee

Re: [sqlite] Slow inserts in indexed table

2012-02-09 Thread Simon Slavin
On 9 Feb 2012, at 1:45pm, Valentin Davydov wrote: > CREATE TABLE T(X, Y, Z, ..., UNIQUE (X, Y, Z, ...) ON CONFLICT IGNORE); > CREATE INDEX IX ON T(X); > CREATE INDEX IY ON T(Y); > CREATE INDEX IZ ON T(Z); > . > > Data in the different columns are small positive integers, 32-bit integers >

[sqlite] Slow inserts in indexed table

2012-02-09 Thread Valentin Davydov
Hi, All! I've got a database containing single table with a dozen of columns and some indices like that: CREATE TABLE T(X, Y, Z, ..., UNIQUE (X, Y, Z, ...) ON CONFLICT IGNORE); CREATE INDEX IX ON T(X); CREATE INDEX IY ON T(Y); CREATE INDEX IZ ON T(Z); . Data in the different columns are

Re: [sqlite] Can I check the auto-vacuum setting on an SQLite database?

2012-02-09 Thread Jay A. Kreibich
On Wed, Feb 08, 2012 at 08:45:56AM -0500, Rob Richardson scratched on the wall: > My deepest apologies for forgetting to change the subject line in my > last post, and thus accidentally hijacking a thread. Here is the > message again, this time with the correct subject. > > On Wed, Feb 8, 2012

Re: [sqlite] Can I check the auto-vacuum setting on an SQLite database?

2012-02-09 Thread Simon Slavin
On 8 Feb 2012, at 1:45pm, Rob Richardson wrote: >> Is there a way to verify the auto-vacuum state of an SQLite database? See the last line of that section. Simon. -- http://www.bigfraud.org | I'd expect if a computer was involved

Re: [sqlite] sqlite3_step getting core dumbed.

2012-02-09 Thread Kees Nuyt
On Thu, 9 Feb 2012 05:07:05 -0800 (PST), bhaskarReddy wrote: > >Is it possible to find the data type, even if the table doesn't have data. >That means, my requirement is, > >1. I want to find the number of columns in the table. ( I already done.) >2. I want to find the names

Re: [sqlite] sqlite3_step getting core dumbed.

2012-02-09 Thread bhaskarReddy
Is it possible to find the data type, even if the table doesn't have data. That means, my requirement is, 1. I want to find the number of columns in the table. ( I already done.) 2. I want to find the names of the columns. (I already done.) 3. I want to find the data types. Because, if it is

[sqlite] Can I check the auto-vacuum setting on an SQLite database?

2012-02-09 Thread Rob Richardson
My deepest apologies for forgetting to change the subject line in my last post, and thus accidentally hijacking a thread. Here is the message again, this time with the correct subject. On Wed, Feb 8, 2012 at 8:44 AM, Rob Richardson wrote: > Greetings! > > Is there a way

Re: [sqlite] sqlite3_step getting core dumbed.

2012-02-09 Thread Marcus Grimm
On 09.02.2012 13:12, bhaskarReddy wrote: Thank you. Its working. But why i am getting sqlite3_column_type returning 5. I can only guess: a) because you have no data in that table. b) probably you have no known type defined in table definition and sqlite does a conversion anyhow. c)

[sqlite] sqlite3_close() blocked data base file

2012-02-09 Thread NOCaut2012
Hi. maybe it is bug sqlite I'm not sure exactly. and decided to CREATE POST. for unknown reasons sqlite3_close() == SQLITE_BUSY, sqlite blocked data base file. I find on the forum next code: void CSQLiteDB::Close() { if(m_db) { sqlite3 *db = m_db; m_db = NULL;

Re: [sqlite] sqlite3_step getting core dumbed.

2012-02-09 Thread bhaskarReddy
Thank you. Its working. But why i am getting sqlite3_column_type returning 5. Marcus Grimm wrote: > > try changing this: > > colNames = (char **)malloc(sizeof(char)); > > into something like > > colNames = (char **)malloc(sizeof(char * ) * noOfColumns); > > > On 09.02.2012 11:21,

Re: [sqlite] sqlite3_step getting core dumbed.

2012-02-09 Thread Marcus Grimm
try changing this: colNames = (char **)malloc(sizeof(char)); into something like colNames = (char **)malloc(sizeof(char * ) * noOfColumns); On 09.02.2012 11:21, bhaskarReddy wrote: HI Friends, I dont know why the sqlite3_step getting core dumped. #include #include

Re: [sqlite] sqlite3_step getting core dumbed.

2012-02-09 Thread bhaskarReddy
No, that is not problem. Taleeb Anwar wrote: > > /* A Query to find types of each column. */ > str = (char *)malloc(sizeof(char) * 255); > memset(str, 0, 255); > strcat(str, "SELECT "); > for(loopVar = 0; loopVar < noOfColumns; loopVar++) > { > strcat(str,

Re: [sqlite] sqlite3_step getting core dumbed.

2012-02-09 Thread Taleeb Anwar
/* A Query to find types of each column. */ str = (char *)malloc(sizeof(char) * 255); memset(str, 0, 255); strcat(str, "SELECT "); for(loopVar = 0; loopVar < noOfColumns; loopVar++) { strcat(str, colNames[loopVar]); if(loopVar < (noOfColumns -1))

[sqlite] Page cache block size problem

2012-02-09 Thread Jaco Breitenbach
Dear experts, In my application performance is of critical importance. I've chosen to preallocate a large contiguous block of memory for the page cache. I make use of the following function to configure the page cache: sqlite3_config(SQLITE_CONFIG_PAGECACHE, void*, int sz, int N); The

[sqlite] sqlite3_step getting core dumbed.

2012-02-09 Thread bhaskarReddy
HI Friends, I dont know why the sqlite3_step getting core dumped. #include #include #include "sqlitedb1.h" #include #include #include #include #include int db_retrieve_row(char *db_name, char *table_name, int num_of_keys, char * col_names[],column_value_t *