issuing dot commands to sqlite through livecode
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 52
- Joined: Mon Apr 06, 2020 1:19 pm
- Location: Thailand
- Contact:
issuing dot commands to sqlite through livecode
Hello:
I'd like to issue some commands such as .tables and .mode and .timer etc. Is it possible from within livecode? I can't seem to make it work but there is an extremely good chance I have missed something clever.
Bruce
I'd like to issue some commands such as .tables and .mode and .timer etc. Is it possible from within livecode? I can't seem to make it work but there is an extremely good chance I have missed something clever.
Bruce
Re: issuing dot commands to sqlite through livecode
Hi Briuce,
looks like LC does really not like commands/functions that start with a DOT!
Use the underscore instead, that does not make any problems.
Or are these (.table etc.) special SQLite commands?
In that case you can surely use them like -> put ".table" into tSQL
Best
Klaus
looks like LC does really not like commands/functions that start with a DOT!
Use the underscore instead, that does not make any problems.
Or are these (.table etc.) special SQLite commands?
In that case you can surely use them like -> put ".table" into tSQL
Best
Klaus
-
- Posts: 52
- Joined: Mon Apr 06, 2020 1:19 pm
- Location: Thailand
- Contact:
Re: issuing dot commands to sqlite through livecode
Hi Klaus:
Are you paid to answer questions or are you simply the most generous guy I've met (virtually)? If the former "what a good job you are doing", if the latter "blimey! What a nice guy".
.commands are special commands in sqlite3 for example if I am running sqlite3 in my terminal and I issue ".tables" sqlite3 will provide me a list of all the tables in the attached database.
I've tried issuing them from within LC but so far LC has been unresponsive to my charms. To be specific I can issue the command of course but sqlite3 will not provide me with a response.
Bruce
Are you paid to answer questions or are you simply the most generous guy I've met (virtually)? If the former "what a good job you are doing", if the latter "blimey! What a nice guy".
.commands are special commands in sqlite3 for example if I am running sqlite3 in my terminal and I issue ".tables" sqlite3 will provide me a list of all the tables in the attached database.
I've tried issuing them from within LC but so far LC has been unresponsive to my charms. To be specific I can issue the command of course but sqlite3 will not provide me with a response.
Bruce
Re: issuing dot commands to sqlite through livecode
Klaus is a REALLY nice guy.
And he's
There are some (rather occasional) visits and posts by LC staff, but this is a user to user help forum, everyone is a volunteer, and it's not the normal channel of support from LC.
And he's
There are some (rather occasional) visits and posts by LC staff, but this is a user to user help forum, everyone is a volunteer, and it's not the normal channel of support from LC.
Re: issuing dot commands to sqlite through livecode
Hi,
AFAIK ".tables" is syntax specific to the SQLite command-line program ("sqlite3"/ "sqlite3.exe"), and NOT part of the supported "dialect of the SQL language".
Since LC communicates with the DB using queries in "SQL language" this may not work. But you may use it via shell:
(or something like it ;-))
I may be wrong. Have fun!
AFAIK ".tables" is syntax specific to the SQLite command-line program ("sqlite3"/ "sqlite3.exe"), and NOT part of the supported "dialect of the SQL language".
Since LC communicates with the DB using queries in "SQL language" this may not work. But you may use it via shell:
Code: Select all
get shell(myPath & slash & "sqlite3 .tables")
I may be wrong. Have fun!
All code published by me here was created with Community Editions of LC (thus is GPLv3).
If you use it in closed source projects, or for the Apple AppStore, or with XCode
you'll violate some license terms - read your relevant EULAs & Licenses!
If you use it in closed source projects, or for the Apple AppStore, or with XCode
you'll violate some license terms - read your relevant EULAs & Licenses!
-
- Posts: 52
- Joined: Mon Apr 06, 2020 1:19 pm
- Location: Thailand
- Contact:
Re: issuing dot commands to sqlite through livecode
AxWald:
Genius! That, or some form of that will be the answer. Thank you SO MUCH. I love it!
Bruce
Genius! That, or some form of that will be the answer. Thank you SO MUCH. I love it!
Bruce