Converting stand-alone databases into shared databases

I just converted several of my stand-alone databases into shared databases that are using the PanoramaX Server. I’ve been keeping track of a few bits of programming that have been working fine for years in my regular databases, but that broke when converted for sharing. Here is a list of the most common problems I’ve found, along with some alternatives I’ve used to correct those problems.

I’m hoping these snippets will be helpful for others as they convert to sharing. I also hope that those of you with more experience and wisdom can critique and improve and extend this list so that I can benefit from what you’ve learned.

;***********************************
;use this instead of Save & Revert
ServerUpdate “Off”
;Make changes or
;Use a scratch field or
;Print a report
ForceSynchronize

;Server Variables
AssignServerVariable “Deposits”, LatestMonnthSV, xxxx
LetFileGlobal LatestMonthFG = ServerVariable(“Deposits”, “LatestMonthSV”)

;we use this strategy instead of SummaryLevel 1
«First Name» = “Temporary Summary Record”
;SummaryLevel 1
ArraySelectedBuild BirthdaysArray, ¶, “Mail List”, ?(info("Summary") > 0 or «First Name» = “Temporary Summary Record”, [etc.]

;to remove a small number of records
//     ;in the single user version, all we had to do was this. But now we have to do what I've replaced it with.
//     SelectReverse
//     RemoveUnselected
IfSelect SomeFormula
;new way to remove unselected recs
LoopWhile info("selected") > 1
CutRecord
EndLoop
SelectAll
Find SomeFormula
If (not info("found"))
Message “There was a programming problem while removing unselected records. Please correct it.”
Stop
Endif
CutRecord
Endif


;Could also use for the above:
LoopWhile info("selected") > 1
CutRecord
EndLoop
Let CurrentRecordID = info("serverrecordid")
SelectAll
Find info("serverrecordid") = CurrentRecordID
If info("found")
DeleteRecord
Else
Message “There was a programming problem while removing unselected records. Please correct it.”
Stop
Endif

;to add / remove / insert / change a large number of records in a procedure
;Make sure other users are disconnected from the server
;Select the records you want to delete
startnewdatabasegeneration initializedictionary("COMPONENTS","data","NOTES","Monthly Archive")
    SelectReverse
    RemoveUnselected
    ... etc
uploadnewdatabasegeneration ""


;to make huge changes in a database by hand
;Make sure other users are disconnected from the server
Select New Generation and select Critical Update
;Make your changes in the database
Select New Generation again and click Upload Database
;***********************************