Re: [sqlite] Problems uploading CSV into sqlite3 DB

2014-09-09 Thread Simon Slavin

On 10 Sep 2014, at 3:45am, Carlos A. Gorricho (HGSAS) 
 wrote:

> The problem was a field with a very long blank string, something like 40
> space-characters.

Was this value correctly delimited with quotes, or was it just 40 spaces 
between two commas separating the fields ?

Simon.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Problems uploading CSV into sqlite3 DB

2014-09-09 Thread Carlos A. Gorricho (HGSAS)
Dear all,

A brief update on how I managed to solve the problem...thank you all for
you remarks and comments, since these were instrumental in the solution.

Indeed sqlite versions had to do a lot with the problem, where 3.8 can
handle csv imports, not without some glitches. I had to go in circles
several times to realize how to make sure I was always working on the right
sqlite version.

I also noticed that I had some problems with my data, for csv import
purposes, in the sqlite environment. This problem did NOT affect csv import
into MS Access.

The problem was a field with a very long blank string, something like 40
space-characters. Apparently the sqlite import engine was not able to
recognize the end of this string and was merging it with the next field,
causing as mismatch between the column field names and the data fields.
This mismatch would compound with every new line imported.

I found the solution by sheer luck. I added manually a new column in the
csv file (from Excel) with a formula to test if the blank field was empty
or text. This created a column filled with boolean values, which sqlite csv
import engine was able to recognize, hence delimiting the large string of
spaces...odd I know, but it worked!


Saludos/Cheers,


*CARLOS A. GORRICHO*
Managing Partner
Heptagon Group S.A.S.
cgorri...@heptagongroup.co
Cel COL +57 314 771 0660
Cell USA +1 713 574 2242
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] GUI INfo

2014-09-09 Thread FarSight Data Systems
Max,

I'm rurrently creating an application with sqlite using python and wxpython 
for the gui.  It's a great combo and working out nicely.

Mark


On Tuesday, September 09, 2014 05:06:53 PM Teg wrote:
> Hello Maxine,
> 
> It's totally unrelated to Sqlite though.
> 
> Pick a programming language that works with Sqlite and make a GUI with
> this programming language.
> 
> C
> 
> Wednesday, September 10, 2014, 4:56:39 PM, you wrote:
> 
> MN> I am an experienced Access VBA programmer. I know about the SQLite
> commands MN> to create and manipulate data in tables and queries.
> 
> MN>
> 
> MN> What I want to know is where do I find info on creating a graphical user
> MN> interface such as menus, forms and reports. What additional programs
> are MN> required to do this?
> 
> MN>
> 
> MN> Thanks in advance,
> 
> MN> Max
> 
> MN>
> 
> MN> ___
> MN> sqlite-users mailing list
> MN> sqlite-users@sqlite.org
> MN> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

-- 

Mark S. Halegua
718-360-1712
917-686-8794
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] GUI INfo

2014-09-09 Thread jose isaias cabrera

"Warren Young" wrote...


On 9/10/2014 14:56, Maxine Nietz wrote:
I am an experienced Access VBA programmer. I know about the SQLite 
commands

to create and manipulate data in tables and queries.



What I want to know is where do I find info on creating a graphical user
interface such as menus, forms and reports. What additional programs are
required to do this?


C#.
D. 


___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] What if OpenDocument were built atop SQLite?

2014-09-09 Thread justin

On 2014-09-08 13:07, John McKown wrote:


Open/Libre Office is Java based.



Are you 100% about that?  When I used to be involved
with OpenOffice (years ago, prior to LibreOffice
split), the main code was C++, with Java used for
some things.  OpenOffice Base was written in Java
for example.

I *think* the Java usage came about politically
because Sun (back in the day) decided Java _going_
to be the language of choice.  Regardless of developer
sentiment.  So they went about developing / bolting on
all of the new pieces with it.

That's my dodgy memory of things anyway.  LibreOffice
might have changed things, etc. ;)

Regards and best wishes,

Justin Clift
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] GUI INfo

2014-09-09 Thread Jens Alfke

> On Sep 10, 2014, at 1:56 PM, Maxine Nietz  wrote:
> 
> What I want to know is where do I find info on creating a graphical user
> interface such as menus, forms and reports. What additional programs are
> required to do this?

SQLite doesn't have anything related to a GUI; it's purely a database engine.

I'm sure there must be a Visual BASIC binding/library/plugin that lets you use 
SQLite. Since you already use VB, that seems like a good thing to use. Then you 
can build the GUI in VB as you're used to.

—Jens
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] GUI INfo

2014-09-09 Thread justin

On 2014-09-10 20:56, Maxine Nietz wrote:
I am an experienced Access VBA programmer. I know about the SQLite 
commands

to create and manipulate data in tables and queries.

What I want to know is where do I find info on creating a graphical 
user
interface such as menus, forms and reports. What additional programs 
are

required to do this?


It depends on what you want your graphical user interface to
do. :)

What's the main goal for your new graphical user interface?

As initial probing questions, do you want to build something
on top of MS Access, or do you want a completely stand-alone
program?

Asking because (in a general sense) there are many ways to
create a GUI.

So, narrowing down the possibilities by knowing the main goal
will help. :)

If you want to see an example of a good stand-alone SQLite GUI
program, this is one example:

  http://sqlitebrowser.org

The source code for it is here:

  https://github.com/sqlitebrowser/sqlitebrowser

It's written in a language called "C++", and uses a popular
cross platform toolkit called "Qt" (qt-project.org).

Does that help? :)

Regards and best wishes,

Justin Clift
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] SQLITE GUI

2014-09-09 Thread Mark Halegua
Max,

I'm currently creating an application with sqlite using python and wxpython 
for the gui.  It's a great combo and working out nicely.

Mark

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] GUI INfo

2014-09-09 Thread Ned Fleming

On Wed, 10 Sep 2014 13:56:39 -0700, "Maxine Nietz"
 wrote:

>I am an experienced Access VBA programmer. I know about the SQLite commands
>to create and manipulate data in tables and queries.

You might want to use Visual Basic, a superset of VBA.


http://www.visualstudio.com/en-us/products/visual-studio-express-vs.aspx

Google for tutorials.

For something completely different, tcl/tk is (I think) pretty
easy to grasp, plus it's cross-platform.

-- 
Ned

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] FW: GUI INfo

2014-09-09 Thread Simon Slavin

On 9 Sep 2014, at 8:58pm, Maxine Nietz  wrote:

> Is  this the way to post a question?

Yes.  We expect you to have made an effort to answer your question before you 
post.  You should have a vague idea where to find things on this site:



for example.  If your question is this

> What I want to know is where do I find info on creating a graphical user
> interface such as menus, forms and reports. What additional programs are
> required to do this?


then the answer is "learn to be a programmer".  SQLite does database management 
for you.  It has no idea about user interfaces.

Simon.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] GUI INfo

2014-09-09 Thread Teg
Hello Maxine,

It's totally unrelated to Sqlite though.

Pick a programming language that works with Sqlite and make a GUI with
this programming language. 

C

Wednesday, September 10, 2014, 4:56:39 PM, you wrote:

MN> I am an experienced Access VBA programmer. I know about the SQLite commands
MN> to create and manipulate data in tables and queries.

MN>  

MN> What I want to know is where do I find info on creating a graphical user
MN> interface such as menus, forms and reports. What additional programs are
MN> required to do this?

MN>  

MN> Thanks in advance,

MN> Max

MN>  

MN> ___
MN> sqlite-users mailing list
MN> sqlite-users@sqlite.org
MN> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users



-- 
Best regards,
 Tegmailto:t...@djii.com

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] GUI INfo

2014-09-09 Thread Warren Young

On 9/10/2014 14:56, Maxine Nietz wrote:

I am an experienced Access VBA programmer. I know about the SQLite commands
to create and manipulate data in tables and queries.



What I want to know is where do I find info on creating a graphical user
interface such as menus, forms and reports. What additional programs are
required to do this?


C#.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] GUI INfo

2014-09-09 Thread Maxine Nietz
I am an experienced Access VBA programmer. I know about the SQLite commands
to create and manipulate data in tables and queries.

 

What I want to know is where do I find info on creating a graphical user
interface such as menus, forms and reports. What additional programs are
required to do this?

 

Thanks in advance,

Max

 

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] FW: GUI INfo

2014-09-09 Thread Maxine Nietz
Is  this the way to post a question?

Max

 

 

From: Maxine Nietz [mailto:nevada...@sbcglobal.net] 
Sent: Monday, September 8, 2014 9:55 AM
To: 'sqlite-users@sqlite.org'
Subject: GUI INfo

 

I am an experienced Access VBA programmer. I know about the SQLite commands
to create and manipulate data in tables and queries.

 

What I want to know is where do I find info on creating a graphical user
interface such as menus, forms and reports. What additional programs are
required to do this?

 

Thanks in advance,

Max

 

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLAR pronunciation

2014-09-09 Thread Richard Hipp
On Tue, Sep 9, 2014 at 2:00 PM, Andy Goth  wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> I have to ask, and I apologize if it's been asked before, but... how
> is SQLAR pronounced?  My best guess is "squalor". :^)
>
> http://www.sqlite.org/sqlar/doc/trunk/README.md
>

Good question.  I suppose I've been saying "Ess Cue El Ar" or "Ess Cue El
Archiver".  The name was originally "SAR" until somebody pointed out that
was an existing utility on unix.


-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] SQLAR pronunciation

2014-09-09 Thread Andy Goth
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I have to ask, and I apologize if it's been asked before, but... how
is SQLAR pronounced?  My best guess is "squalor". :^)

http://www.sqlite.org/sqlar/doc/trunk/README.md

- -- 
Andy Goth | 
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.22 (MingW32)

iQEcBAEBAgAGBQJUD0BRAAoJELtYwrrr47Y4k74H/A5MObcI0iXHhXXY3Na9pQwL
iFwjzyrcBoQRskHd3kcvJK/TQG1eGUhIGeuuvZh98jDVO9KL9glc7QDptSlApwBC
hDvPSdgYmFMwydOcVaJ9V/AJZ2n5PWVenfJ/pZM+Yrd5DYSLYISZ/AgP0nsVtR6N
9LH0oChgaPQHNCGbrDODDUAtGjQND/hH8CRXa9+fZJi6K7jHt/riXMOahY37K7Vl
WDeDwuD6zV+u1xV39ovVYRCiYGiPHqAUdzCRDliBKxpkkLXqhUzB0VKAKoxfdNr+
L4MIfkQJMoDsVJ0xEOkGJXDKu4TuoQLD1/ZhEfh2RES6g4VUW1aJ5mr72waP1w8=
=TAgg
-END PGP SIGNATURE-
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] What if OpenDocument were built atop SQLite?

2014-09-09 Thread Nico Williams
On Mon, Sep 8, 2014 at 11:46 PM, Stephan Beal  wrote:
> FWIW:
>
> http://fossil.wanderinghorse.net/wikis/cson/?page=cson_sqlite3

Yup, I've written that sort of wrapper in Python too.  Of course, in
the preceding sub-thread I'm talking about something rather different,
but there's no denying that a JSON<->SQL wrapper is useful!

Nico
--
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] sqlite crash when realloc fails

2014-09-09 Thread Richard Hipp
On Tue, Sep 9, 2014 at 10:39 AM, Dominique Devienne 
wrote:

> On Tue, Sep 9, 2014 at 1:50 PM, Sebastien David 
> wrote:
>
> > I have a database with 10million of row in one table (file size is ~5GB)
> > When I execute a query that should return half of this table, sqlite
> fails
> > because at some point there is  no memory (this is normal) [...]
>
>
> Why do you think it's normal?
>

Yes, he shouldn't be using sqlite3_get_table() as the interface is marked
as deprecated.  Sabastien should be using sqlite3_prepare() and
sqlite3_step().

On the other hand, we should fix sqlite3_get_table() so that it works
without integer overflow problems, which are unacceptable even in a
"deprecated" interface.  The problem will be doing that in a way that is
testable on embedded systems



>
> Since your query has no SORTING or GROUPING, there's no reason for SQLite
> to use an inordinate amount of memory beyond it's page cache, unless your
> callback_cache_filter_check(record_id) function call does some
> memory-expensive operation.
>
> That your application code runs out of memory if it stores those 5M rows,
> sure, but I don't see why SQLite itself would use a lot of memory in that
> case. What am I missing? --DD
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] sqlite crash when realloc fails

2014-09-09 Thread Dominique Devienne
On Tue, Sep 9, 2014 at 1:50 PM, Sebastien David 
wrote:

> I have a database with 10million of row in one table (file size is ~5GB)
> When I execute a query that should return half of this table, sqlite fails
> because at some point there is  no memory (this is normal) [...]


Why do you think it's normal?

Since your query has no SORTING or GROUPING, there's no reason for SQLite
to use an inordinate amount of memory beyond it's page cache, unless your
callback_cache_filter_check(record_id) function call does some
memory-expensive operation.

That your application code runs out of memory if it stores those 5M rows,
sure, but I don't see why SQLite itself would use a lot of memory in that
case. What am I missing? --DD
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] sqlite crash when realloc fails

2014-09-09 Thread Sebastien David
Hi,

I have a database with 10million of row in one table (file size is ~5GB)
When I execute a query that should return half of this table, sqlite fails
because at some point there is  no memory (this is normal) but instead of
returning an error, it crashes.

sqlite version: 3.7.5

#0  0x0065b70e in sqlite3_get_table (db=0x7fffe0023d08,
zSql=0x7fffc001a6e8 "SELECT * FROM sync_snapdb_table WHERE tobe_deleted
= 0 AND scn_not_visited < 30 AND 1 =
callback_cache_filter_check(record_id);",
pazResult=0x7fffdabfa110, pnRow=0x7fffdabfa16c, pnColumn=0x7fffdabfa168,
pzErrMsg=0x7fffdabfa118)
at /mytest/imports/3rdparty/sqlite/sqlite3.c:92643

After some investigation, i found that sqlite3_get_table_cb is called with
nAlloc equals to ~164856293,  a realloc is requested and nAlloc is now ~325
000 000
So sqlite3_realloc is called with  ~2 630 000 000, this value gives a
negative value because nAlloc is an int. In this case, sqlite3_realloc
releases the pointer.

Afterward in sqlite3_get_table at line 92643, this released pointer is used.

To fix i quickly added this line in sqlite3_get_table_cb before :

  if( p->nData + need > p->nAlloc ){
char **azNew;




* if (p->nAlloc >
(int)(0x3fff/sizeof(char*)-need*sizeof(char*))) {   goto
malloc_failed;  }*

  p->nAlloc = p->nAlloc*2 + need;
  azNew = sqlite3_realloc( p->azResult, sizeof(char*)*p->nAlloc );
...


Do you think this fix is right ?
Is it necessary to apply the same fix in other places?

Thank you
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] About a problem "FTS expression tree is too large"

2014-09-09 Thread Clemens Ladisch
Nao Shoji wrote:
> SELECT * FROM my_table WHERE ... word MATCH ' OR  OR  OR  ... '
>
> FTS expression tree is too large (maximum depth 12)

This means that there are too many (more than 2^12) search words.

You could split the word list so that you have multiple queries.
(You might be able to use subqueries.)

Alternatively, recompile SQLite with a larger value of
SQLITE_FTS3_MAX_EXPR_DEPTH.  (This probably requires recompiling
PHP itself.)


Regards,
Clemens
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] About a problem "FTS expression tree is too large"

2014-09-09 Thread Nao Shoji
Dear sqlite-users.
I am Nao Shoji and I work as a server side engineer.
In this time, I contacted to yours, because I faced a sqlite problem.

On a daily basis, I develop web applications by PHP.
Our application uses sqlite database as full-text searching engine.
Additionally, a table format of sqlite database is fts3.
As a main processing, a very long query is executed on the table.
(Example: SELECT * FROM my_table WHERE  1 = 1  AND tempo >= 100 AND tempo <= 
150 AND word MATCH ' OR  OR  OR  ... ' LIMIT 0, 100)

It is no problem in case of older PHP versions.
But in case of new PHP versions, PDOException often occurs. 
That exception is shown as follows.

exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 1 FTS 
expression tree is too large (maximum depth 12)

This exception depends PHP version.
I confirmed an operation of application which is used fts3 table on some PHP 
versions.
That results are shown as follows, 

 - PHP 5.3.20(linux) : The problem doesn't occur.
 - PHP 5.3.28(linux) : The problem occurs.
 - PHP 5.4.7(xampp of windows) : The problem doesn't occur.
 - PHP 5.5(xampp of windows) : The problem occurs.

Please tell me the solution of problem.
If possible, I would like to receive to your response by this e-mail 
address(shoj...@sockets.co.jp).
(I don't join sqlite-users yet.)

Regards,
sqlite-users.

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users