Postgres SQL Server
Posted: Fri Jan 04, 2019 8:06 pm
Good evening. I was originally using MySQL, but it would crash all the time, so I moved to Postgres SQL.
But I'm unable to connect to the server via my mobile device, however, I can do so locally.
Could someone walk me through how to connect my test app?
For clarification, I can connect to the database while executing the above code in the native livecode environment. But I'm not able to connect to the database once it's placed on a standalone app for Android.
But I'm unable to connect to the server via my mobile device, however, I can do so locally.
Could someone walk me through how to connect my test app?
Code: Select all
global gConnectionID
put revOpenDatabase("postgresql", xxx.x.x.x, tDatabaseName, tDatabaseUser, tDatabasePassword) into tResult
-- check if it worked and display an error message if it didn't
-- & set the connection ID global
if tResult is a number then
put tResult into gConnectionID
answer info "Connected to the database." & cr & "Connection ID = " & gConnectionID
else
put empty into gConnectionID
answer error "Unable to connect to the database:" & cr & tResult
end if