Logging on with my Public IP address?
Das Goravani
goravanis at gmail.com
Wed Jan 26 16:44:42 UTC 2022
I use the NO-IP service for IP address. I do not have a fixed IP.
I can log onto my PG database from a local computer on my home network where my server is using 192.168.1.3
Which is my servers current local address.
But when I use my public IP address of 142.197.254.173 then I cannot log onto my PG database.
Why is that?
I want to be able to present the ability for others around the country to log onto my server’s PG database for a demo I am making.
So I want to use my public IP address for logging on I believe.. right? Isn’t that right?
When I try to run the following code, it takes a long pause on the $logon line.. and returns flag false
This is my logon code:
Calculate iUserName as $ctask.tUserRow.rep_username
Calculate iUserPassword as $ctask.tUserRow.rep_password
Do $ctask.tSessObjPG.$logoff()
Do $root.$sessions.PGSESSION.$logoff()
Do tSessObjPG.$port.$assign(5432)
Do tSessObjPG.$database.$assign('DasPGDB')
Do tSessObjPG.$hostname.$assign('142.197.254.173')
Do tSessObjPG.$logon('142.197.254.173',iUserName,iUserPassword,'PGSESSION') Returns #F
If flag true
Do tSessObjPG.$newstatement('StatObjPG') Returns tStatObjPG
Do $ctask.tStatObjPG.$maxresultsetsize.$assign(2,147,483,647)
Calculate tSessObjPGRef as $extobjects.PGSQLDAM.$objects.PGSQLSESS.$newref()
Calculate $ctask.tStatObjPGRef as $ctask.tSessObjPG.$newstatementref()
End If
Quit method #F
More information about the omnisdev-en
mailing list