SQL Show Status

Bob Sneidar bobsneidar at iotecdigital.com
Tue Oct 20 17:20:16 EDT 2020


I’m wondering what status you are trying to retrieve. If you are wanting to see if the SQL database is accessible/online, using an actual query has it’s drawbacks. Querying an SQL database that is inaccessible will result in a 60 second timeout during which Livecode will be unresponsive. 

What I do instead is I first execute a telnet command using shell(). This will tell me if I can get to the SQL server and if it’s listening. The next thing you can do is execute a simple query SHOW STATUS will work as well as anything else. You can also execute something like select 1+1 as sum. You don’t even need to know a table or column. 

Bob S


> On Oct 19, 2020, at 10:53 AM, matthias rebbe via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> You have to use
> 
> revDataFromQuery()
> 
> because that will execute the SQL statement and will return any data that is coming from the DB Server.
> 
> Regards,
> Matthias
> 
> -
> Matthias Rebbe
> Life Is Too Short For Boring Code
> 
>> Am 19.10.2020 um 19:41 schrieb Sean Cole (Pi) via use-livecode <use-livecode at lists.runrev.com>:
>> 
>> Hi Ralph,
>> 
>> What do I do to see the data in the two columns? My brain is hurting too
>> much to figure it out.
>> 
>> Thanks
>> Sean
>> 
>> On Mon, 19 Oct 2020 at 18:26, Ralph DiMola via use-livecode <
>> use-livecode at lists.runrev.com> wrote:
>> 
>>> Sean,
>>> 
>>> revQueryDatabase(tConnId, “SHOW STATUS”) only returns an integer
>>> 
>>> That integer is a record set.
>>> In my case it returned 536 rows.
>>> Each row has two columns:
>>> Variable_name
>>> Value
>>> 
>>> 
>>> Let me tell you Mr. Johnson... Some very interesting stuff in there.
>>> 
>>> Ralph DiMola
>>> IT Director
>>> Evergreen Information Services
>>> rdimola at evergreeninfo.net
>>> 
>>> 
>>> -----Original Message-----
>>> From: use-livecode [mailto:use-livecode-bounces at lists.runrev.com] On
>>> Behalf Of Sean Cole (Pi) via use-livecode
>>> Sent: Monday, October 19, 2020 12:50 PM
>>> To: How to use LiveCode
>>> Cc: Sean Cole (Pi)
>>> Subject: SQL Show Status
>>> 
>>> Hi
>>> 
>>> As everyone likes to hijack threads here, I’ve started another to make
>>> sure it gets seen.
>>> 
>>> 
>>> revQueryDatabase(tConnId, “SHOW STATUS”) only returns an integer
>>> 
>>> Same for revdb_execute which returns 0
>>> 
>>> Any clues on how to actually get the status back?
>>> 
>>> Still trying to work out why these certificates are not working.
>>> --
>>> Sean Cole
>>> *Pi Digital Productions Ltd*
>>> www.pidigital.co.uk
>>> +44(1634)402193
>>> +44(7702)116447
>>> 'Don't try to think outside the box. Just remember the truth: There is no
>>> box!'
>>> 'For then you realise it is not the box you are trying to look outside of,
>>> but it is yourself!'
>>> 



More information about the use-livecode mailing list