In CreoPlayer or Simulator when the iPad either sleeps or switches apps the Postgres connection to AWS is lost. Aside from rebooting the app I tried code to reconnect from the toolbar ;
func onSuccess (db) {
var alert = Alert("Connected", "You are connected to the Postgres cloud. ");
alert.show();
Odontogram.loadrecord();
}
func onError (db) {
var alert = Alert("Error", "You are NOT connected to the Postgres cloud. ");
alert.show();
}
PostgreSQL1.connect (onSuccess, onError) ;
However this generates the error statement - You are NOT connected to the Postgres cloud.
Is there a specific way to force a DB connection ?
Thanks,
Joel