On Sat, Aug 18, 2012 at 1:05 PM, Dr. Hawkins <[email protected]> wrote:
> On Sat, Aug 18, 2012 at 11:28 AM, Peter Haworth <[email protected]> wrote: > > > You don't HAVE to remove the START/COMMIT, I was pointing out that they > are > > superfluous. Leave them in if you wish. > > > > OK; I thought that it was up to the db what to do without them. > > > > The semicolon issue has nothing to do with what mySQL requires, it's a > > Livecode requirement - see the dictionary. > > > > I'm not seeing that in the 5.5.1 dictionary for revExecuteSQL (or > revDataFromQuery, for that matter). Am I looking in the wrong place? > >From the dictionary entry for revExecuteSQL: "The SQLStatement is a string <dictionary/keyword/1541.xml> in Structured Query Language <glossary/s/461.xml>. (Do not include a semicolon at the end of the SQLStatement.)" > > And while I'm asking such things, how can Livecode even *have* a > requirement here--shouldn't it be just passing the command to the database? > Ours not to reason why, ours just to do as mother ship instructs :-) Have you tried it without the semicolons? > > > > Finally, if you're using revDataFromQuery to do this, I'm surprised it > ever > > worked. You're not getting data from a query, you're executing SQL > > commands so you need to use revExecuteSQL. > > > > Until today, I had been sending single line commands. > > I'm trying to cut the lag from a remote db by batching those commands I can > (there was really no reason for these to be individual queries in the first > place, other than that there will only be one or two of them typically, > save when opening a new client "file", in which case there will be dozens") OK, if you are doing multiple ALTER TABLE statements, then yes, wrap them in START/COMMIT. I thought you were only executing one since that is what was in your original example. But you still need to use revExecuteSQL; revDataFromQuery is for returning columns from a SELECT statement. I'm curious as to why you need to add all these columns to an existing table. I assume your database must be customizable according to the clients' needs? > . > > MySQL's own examples are generally multi-line, with the begin/commit > syntax. > Yep, multiline=inlcude START/COMMIT, single line= no need to include START/COMMIT but doesn't do any harm if you do. > > thanks > > hawk, confused > -- > The Hawkins Law Firm > Richard E. Hawkins, Esq. > (702) 508-8462 > [email protected] > 3025 S. Maryland Parkway > Suite A > Las Vegas, NV 89109 > _______________________________________________ > use-livecode mailing list > [email protected] > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > _______________________________________________ use-livecode mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
