• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
cdb_batchSync
#1
Here is some sample code on how to use cdb_batchSync

//THIS API WILL SYNC MULITPLE TABLES AT ONCE
//pInputA: This array contains primary keys of tableID. The secondary keys are
//(cdbRecordID,source,allowDeletes,detectCollisions)

—REPEAT THROUGH ALL TABLES AND BUILD AND INPUT ARRAY
—THIS EXAMPLE WILL DO FULL TABLE SYNCS
—YOU COULD SWITCH OUT THE ‘*’ FOR LINE DELIM RECORD IDS IF YOU WANT TO DO PARTIAL SYNCS
repeat for each line xTableID in cdb_tableID("*")
  put "*" into tInputA[xTableID]["cdbRecordID"]
  put “cloud" into tInputA[xTableID]["source"]
  put true into tInputA[xTableID]["allowDeletes"]
  put true into tInputA[xTableID]["detectCollisions"]
end repeat

put cdb_batchSync(tInputA) into tResults
if not cdb_result() then
  put "Error:" && cdb_result("response")
end if
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)