| Welcome, Guest |
You have to register before you can post on our site.
|
| Online Users |
There are currently 180 online users. » 0 Member(s) | 178 Guest(s) Baidu, Facebook
|
| Latest Threads |
Step Up to the Plate: How...
Forum: Getting Started
Last Post: Innocent Sozonov
11-27-2026, 05:33 PM
» Replies: 0
» Views: 89
|
Understanding the Physics...
Forum: General
Last Post: rodeoneerer
11-27-2026, 03:02 AM
» Replies: 0
» Views: 108
|
Escaping Granny's Grasp: ...
Forum: General
Last Post: Anfisa Seleznyova
11-23-2026, 02:02 AM
» Replies: 0
» Views: 144
|
Olive Young Promo Code [G...
Forum: General
Last Post: yanarip357
11-19-2026, 05:32 PM
» Replies: 0
» Views: 154
|
Olive Young Discount Code...
Forum: General
Last Post: yanarip357
11-19-2026, 05:31 PM
» Replies: 0
» Views: 133
|
Olive Young Promo Code [G...
Forum: General
Last Post: yanarip357
11-19-2026, 05:29 PM
» Replies: 0
» Views: 135
|
【Working Code】Olive Y...
Forum: General
Last Post: yanarip357
11-19-2026, 05:28 PM
» Replies: 0
» Views: 149
|
Olive Young Discount Code...
Forum: General
Last Post: yanarip357
11-19-2026, 05:26 PM
» Replies: 0
» Views: 133
|
【Working Code】Olive Y...
Forum: General
Last Post: yanarip357
11-19-2026, 05:25 PM
» Replies: 0
» Views: 129
|
Olive Young Discount Code...
Forum: General
Last Post: yanarip357
11-19-2026, 05:24 PM
» Replies: 0
» Views: 125
|
|
|
| tip needed on working with data locally |
|
Posted by: sltfn - 08-27-2019, 09:22 PM - Forum: General
- Replies (1)
|
 |
Hi. I'm full of questions and have appreciated several helpful answers so far.
To speed processing I'm trying to reduce the number of queries to the cloud my app needs to make. So I'd like to query, retain the data locally temporarily and make further queries to local. Then at end of session update any records that have changed to the cloud. I've wondered about three approaches I hope could work.
1) I make this query.
cdb_batchQuery(tInputA,"cloud","logicalAND","recordData") into tOutputA
Can tOutputA be queried and updated as if it were a table? If so, what's the syntax?
2) If what I've suggested above isn't possible, what is the syntax to populate the data in tOutputA to a local table?
Is put cdb_batchCreate(tInputA, "local") into tOutputB sufficient or are steps required before that command to create a new table?
3) I am aware of the cdb_loadTable command, but I would greatly prefer not to load the entire table, but instead a subset of the table's contents defined by a query. Is that doable?
I imagine there are good solutions available. What are they? Thanks in advance!
|
|
|
|
| query operators and dates |
|
Posted by: sltfn - 08-23-2019, 10:26 PM - Forum: General
- Replies (1)
|
 |
I think I have a problem I'll need to code around. I am porting an app that formerly worked with MySQL tables to LiveCloud.
This means dates are stored in the MySQL format YYYY-MM-DD: e.g., 2019-08-23.
Unless I'm mistaken, LiveCode's date format options don't include this format. So, I'm guessing (will test soon), none of the available CDB query operators will allow me, for example, to select for a date less than or equal to 2019-08-23.
I assume, per the documentation, that "<=" won't work because the data is non-numeric and that "date<=" won't work because the data will be seen as a non-dateitem.
True? Any workaround suggestions? I'd definitely prefer not to have to reformat hundreds of thousands of records that include dates and rewrite dozens of lines of code that assume the MySQL date format as their basis.
Thanks in advance.
|
|
|
|
| Working with cdbBlobs table |
|
Posted by: simon.schvartzman - 08-21-2019, 08:36 PM - Forum: General
- Replies (4)
|
 |
Hi team, two questions about cdbBlobs:
1 - I have some "corrupted" records (my fault when uploading) that I would like to delete but when I try to do so by right clicking on the record I get "Couldn't find Blob Table Info" and it isn't deleted. Any workaround?
2 - How can I download all the records of the cdbBlobs table at once? I've tried selecting all the records and then right clicking + Blobs + Download but just one record was downloaded (BTW neither the first nor the last one, just one somewhere in between...)
Thanks
|
|
|
|
| no server response at all for last 16-17 hours! :-( |
|
Posted by: sltfn - 08-20-2019, 06:11 PM - Forum: General
- Replies (2)
|
 |
LiveCloud seems to be down. When will this be fixed?
(2019-08-20 10:49:15.192): The server response could not be downloaded at this time.
(2019-08-20 10:49:45.201): The server response could not be downloaded at this time.
(2019-08-20 10:50:15.205): The server response could not be downloaded at this time.
(2019-08-20 10:50:15.205): Error: There was a problem getting a response from the server for cdb_batchQueryCloud request.
(2019-08-20 10:54:36.952): The server response could not be downloaded at this time.
(2019-08-20 10:55:06.958): The server response could not be downloaded at this time.
(2019-08-20 10:55:36.967): The server response could not be downloaded at this time.
(2019-08-20 10:55:36.967): Error: There was a problem getting a response from the server for cdb_countCloud request.
|
|
|
|
| I broke my code Help |
|
Posted by: clarencemartin - 08-20-2019, 01:16 PM - Forum: General
- No Replies
|
 |
I am getting a problem when I get data from LCM.
I keep getting an error and the editor is opening in debug mode with the Stack "CDB_Starter.lib" I was randomly having this happen for the past week and just closing the editor fixed things, but not anymore. It is constantly opening the editor debug mode.
The message box is not showing any errors!
I'll be examining my scripts but I really don't know what to look for.
I will need some help to find what I messed up!
addendum:
I just got a belated message box error list:
(2019-08-20 06:10:20.896): The server response could not be downloaded at this time.
(2019-08-20 06:10:50.946): The server response could not be downloaded at this time.
(2019-08-20 06:11:21.010): The server response could not be downloaded at this time.
(2019-08-20 06:11:21.010): Error: There was a problem getting a response from the server for cdb_listCloud request.
this was after trying to examine my script in the stack.
|
|
|
|
| code to unpack query array to tab-delimited data? |
|
Posted by: sltfn - 08-19-2019, 07:26 PM - Forum: Code Samples
- Replies (4)
|
 |
Hello. I am very new to and still much in the dark about arrays. I am looking for efficient code to unpack the output from a query to lines of tab-delimited data (one record per line). Here is the code I've come up with so far. I'd guess there MUST be a more efficient approach.
on mouseup
## query constructed above
put cdb_batchQuery(tInputA,"cloud","logicalAND","recordData") into tOutputA
put flattenArray( tOutputA) into flattened -- see flattenArray function below
end mouseup
function flattenArray A , d1, d2, T, X
if T is empty then
if d1 is empty then put cr into d1
if d2 is empty then put tab into d2
end if
if A is not an array then return T & X & A & d1
repeat for each key K in A
put flattenArray( A[K], d1, d2, T, X & K & d2 ) into T
end repeat
end flattenArray
This yields the queried records in this format (just one record of many shown here).
[CDB Table ID] 1 [CDB Record ID] ATTRIBUTES fopn
[CDB Table ID] 1 [CDB Record ID] LAST_NAME Jordan
[CDB Table ID] 1 [CDB Record ID] STATUS linnm
[CDB Table ID] 1 [CDB Record ID] RANK 2
[CDB Table ID] 1 [CDB Record ID] CITY San Francisco
[CDB Table ID] 1 [CDB Record ID] YEAR 2019
[CDB Table ID] 1 [CDB Record ID] ROLE 5
[CDB Table ID] 1 [CDB Record ID] NAME Sam Jordan
[CDB Table ID] 1 [CDB Record ID] DATE 2019-02-17
[CDB Table ID] 1 [CDB Record ID] cdb cdbDateModified 1562677087
[CDB Table ID] 1 [CDB Record ID] cdb cdbDateCreated 1562677087
[CDB Table ID] 1 [CDB Record ID] cdb cdbRecordID [CDB Record ID]
[CDB Table ID] 1 [CDB Record ID] cdb cdbTableID [CDB Table ID]
[CDB Table ID] 1 [CDB Record ID] cdb cdbRecordVersion 1
[CDB Table ID] 1 [CDB Record ID] cdb cdbTableName stats
[CDB Table ID] 1 [CDB Record ID] cdb cdbCloudSyncVersion 1
I then loop through the lines and remove the first two columns, then I filter out the lines with "cdb" keys not needed in my app as long as I preserve the record ID, and get a list of records like this…
[CDB Record ID] ATTRIBUTES fopn
[CDB Record ID] LAST_NAME Jordan
[CDB Record ID] STATUS linnm
[CDB Record ID] RANK 2
[CDB Record ID] CITY San Francisco
[CDB Record ID] YEAR 2019
[CDB Record ID] ROLE 5
[CDB Record ID] NAME Sam Jordan
[CDB Record ID] DATE 2019-02-17
Finally, I loop through the lines again and put the data for each record into the tab-delimited format I need, which is something roughly like this…
fopn Jordan linnm 2 San Francisco 2019 Sam Jordan 2019-02-17 [CDB Record ID]
ucpn Smith linnm 1 Los Angeles 2019 Susan Smith 2019-06-23 [CDB Record ID]
efrain.c and mark_talluto's suggestions for batch record creation and updates were VERY helpful. Thank you.
Does anybody have a simpler solution for this problem? Pretty sure there must be one (many). Thanks in advance.
|
|
|
|
| Any way to change location once its set up? |
|
Posted by: sid - 08-18-2019, 02:02 PM - Forum: Getting Started
- Replies (2)
|
 |
Hi Everyone,
I'm new to all this and based in South Africa.
Unfortunately I picked San Francisco as the location when I set up the livecloud account. Its really really slow and frustrating so I would like to change the location to LON1 (London UK) If there any way to do this without creating a totally new account? I just need a feature to transfer my account to the closer location...
According to most people in the DigitalOcean LON1 is the best option for us here in SA.
I wonder what the lag times would be for fellas in Austrailia?
Sid
|
|
|
|
|