bundling multiple database queries and getting a result

Björnke von Gierke bvg at mac.com
Sun Jun 2 06:56:14 EDT 2013


You can't do multi line sql with livecode, you have to issue them separately. So for example in SQLite this works to reduce latency:

revexecuteSQL theConnID, "BEGIN TRANSACTION"
repeat 20 times
   revexecuteSQL theConnID, "INSERT INTO table (column) VALUES 'blah'"
end repeat
revexecuteSQL theConnID, "END TRANSACTION"

Dunnow if it'll help in a networked environment when doing queries tho.

On 01.06.2013, at 20:45, Dr. Hawkins wrote:

> My initial forays haven't been successful.
> 
> I want to pull unrelated things, likely from different tables, from the
> same database as part of a single inquiry
> 
> something like
> 
> begin transaction;
> SELECT a, b, c FROM firsttable;
> SELECT name,address FROM othertable WHERE ID=47;
> commit;
> 
> The inquiries aren't really related, but the latency in an offsite query
> means that a series of inquiries slows down the program.
> 
> I've tried
> 
> BEGIN TRANSACTION;
> SELECT val FROM baggins_bilbo____001_dinfo WHERE kywd='dFirstName';
> SELECT val FROM baggins_bilbo____001_dinfo WHERE kywd='dLastName';
> COMMIT;
> 
> Which returns 0 from revExecuteSQL
> 
> I've tried leaving off the begin/commit with revDataFromQuery, but only the
> last query gets executed.
> 
> -- 
> Dr. Richard E. Hawkins, Esq.
> (702) 508-8462
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


-- 

Use an alternative Dictionary viewer:
http://bjoernke.com/bvgdocu/

Chat with other RunRev developers:
http://bjoernke.com/chatrev/






More information about the use-livecode mailing list