Re: SQL lite adding records

2015-03-25 Thread Ralph DiMola
...@evergreeninfo.net Original message From: Peter Haworth Date:03/25/2015 17:12 (GMT-05:00) To: How to use LiveCode Subject: Re: SQL lite adding records My latest product, SQLMagic, is inching slowly to a GM release. Using it, you will not need to write any Livecode

Re: SQL lite adding records

2015-03-25 Thread Peter Haworth
My latest product, SQLMagic, is inching slowly to a GM release. Using it, you will not need to write any Livecode scripts or issue an SQL statements for a large percentage of your SQL transactions. Email me offline if you would like to be on my SQLMagic mailing list. On April 16th, I am presenti

Re: SQL lite adding records

2015-03-25 Thread JB
It would be nice to have a good stack with all of the power and tricks using SQL with Livecode. I would even pay for it. Any power users want to make a few dollars? If you do I personally thinks it should be code examples instead of some hidden library etc. John Balgenorth On Mar 25, 2015, at

Re: SQL lite adding records

2015-03-25 Thread JB
Thanks, Mike! I have no doubt what I will be using now. Good info & thanks. John Balgenorth On Mar 25, 2015, at 1:16 PM, Mike Bonner wrote: > Part of the slowdown when inserting a large number of rows one at a time is > the opening and closing of the transaction file. If you want to see thi

Re: SQL lite adding records

2015-03-25 Thread Erik Beugelaar
I am not surprised. A lot of developers do not know the power and tricks of presenting and performing data via SQL language. Mike Bonner wrote: >Part of the slowdown when inserting a large number of rows one at a time is >the opening and closing of the transaction file. If you want to see thi

Re: SQL lite adding records

2015-03-25 Thread Mike Bonner
Part of the slowdown when inserting a large number of rows one at a time is the opening and closing of the transaction file. If you want to see this in action, you can set a loop up to do repeated single row inserts, then watch in your file browser next to the db file as the transaction file appea

Re: SQL lite adding records

2015-03-25 Thread JB
Okay, thanks! I have been looking a SQLYoga and see it has search, sort and find. It seems to use arrays but with using large amounts of data in a data grid you need to use a cursor. SQLYoga does provide the ability to use cursors but since it is using the arrays is that using a lot of memory?

Re: SQL lite adding records

2015-03-25 Thread JB
Thanks for the reply and infer. Bob! Your info always helps a lot. John Balgenorth On Mar 25, 2015, at 9:53 AM, Bob Sneidar wrote: > Just to be clear, using BEGIN and COMMIT is called transactional. It’s > purpose is to be able to ROLLBACK if any errors occurred. This not only > includes SQL

Re: SQL lite adding records

2015-03-25 Thread Peter Haworth
Whoops! Thanks for letting me know about the 404 error - will go to fix it right now. SQLIteAdmin does have query/sort features but, just to be clear, it is a standalone program so you can't see the code. Pete On Tue, Mar 24, 2015 at 7:14 PM JB wrote: > Hi Peter, > > Thank you so much for the

Re: SQL lite adding records

2015-03-25 Thread Peter Haworth
Not necessary in one shot INSERT/UPDATE/DELETE because SQL does it for you behind the scenes if you don't issue the BEGIN/COMMIT your self. However, if you have a logically related set of INSERT/UPDATE/DELETE statements, even if it's only two, it's absolutely necessary for database integrity reaso

Re: SQL lite adding records

2015-03-25 Thread Bob Sneidar
Just to be clear, using BEGIN and COMMIT is called transactional. It’s purpose is to be able to ROLLBACK if any errors occurred. This not only includes SQL errors (which should not be happening if you control the SQL and data), but internal errors, like for instance you insert an invoice then go

Re: SQL lite adding records

2015-03-24 Thread JB
It is a disk stored db, and I will be adding a lot of records at one time every so often. Speeding it up will be great! thanks again, John Balgenorth On Mar 24, 2015, at 8:30 PM, Dr. Hawkins wrote: > On Tue, Mar 24, 2015 at 8:19 PM, JB wrote: > >> I have not heard of BEGIN TRANSACTION >> bu

Re: SQL lite adding records

2015-03-24 Thread Dr. Hawkins
On Tue, Mar 24, 2015 at 8:19 PM, JB wrote: > I have not heard of BEGIN TRANSACTION > but I will give it a try. > At least assuming a disk stored db, it is likely also faster. In my case, I pull several hundred records from a remote postgres db, and stash them into a memory sqlite db. My enemy

Re: SQL lite adding records

2015-03-24 Thread JB
Thank you, Dr. Hawkins! I have not heard of BEGIN TRANSACTION but I will give it a try. John Balgenorth John On Mar 24, 2015, at 8:13 PM, Dr. Hawkins wrote: > On Tue, Mar 24, 2015 at 6:52 PM, Peter Haworth wrote: > >> You should issue a BEGIN statement right before your repeat statement and

Re: SQL lite adding records

2015-03-24 Thread Dr. Hawkins
On Tue, Mar 24, 2015 at 6:52 PM, Peter Haworth wrote: > You should issue a BEGIN statement right before your repeat statement and > move your revCommitDatabase to right after the end repeat. Better > performance and guarantees db integrity. > Also, you can build a large statement for a single t

Re: SQL lite adding records

2015-03-24 Thread JB
I should mention when I said sort and find I mean in a single table. I did the Sample database and can do the inner and outer joins. I also have Valentina and can do just about everything they offer including sort and find but I want to use SQL also. John Balgenorth On Mar 24, 2015, at 7:11 PM,

Re: SQL lite adding records

2015-03-24 Thread JB
Hi Peter, Thank you so much for the detailed info! Each value has single quotes now but it would be nice to do it without quotes as adding them takes more time. I will definitely use th BEGIN statement and thank you for explaining it. I tried to use revCommitDatabase after the repeat without th

Re: SQL lite adding records

2015-03-24 Thread Peter Haworth
Hi John, A few ideas for you. You should issue a BEGIN statement right before your repeat statement and move your revCommitDatabase to right after the end repeat. Better performance and guarantees db integrity. For some reason I don't understand, LC does not have a revxxx statement to issue a BE