XojoCloud WebApp locale access to XojoCloud Database

I’m making tests with XojoCloud and XojoCloud Postgres Database

I create a small app and I can connect to my Database with this code

Var db As New PostgreSQLDatabase
db.UserName = "user"
db.Password = "password"
db.Host = "localhost"
db.Port = 5432
db.DatabaseName = "dbname"
Try
  db.Connect
  // You're connected!
  Label1.Text = "Connected"
Catch error As DatabaseException
  Label1.Text = error.Message
  System.DebugLog error.Message
End Try

It works fine when I deploy it on XojoCloud. But how can I test my app on my Mac locally with real data stored on XojoCloud?

This blog post talks about this to do that from an app that is running locally:

1 Like

I try it but I got this error

expected authentication request from server, but received S

Var db As New PostgreSQLDatabase
db.UserName = "user" // From XojoCloud PostgreSQL
db.Password = "pw" // From XojoCloud PostgreSQL
db.Host = "xxx.xx.xx.xxx" // IP from XojoCloud server
db.Port = 22 
db.DatabaseName = "dbname"
Try
  db.Connect
  // You're connected!
  Label1.Text = "Connected"
Catch error As DatabaseException
  Label1.Text = error.Message
  System.DebugLog error.Message
End Try

Ok. Since we’ve also been talking via email, I will reply to this in email.

1 Like