Database Connect - URL vs IP

It could be something else I’m doing…but I have some code like this…

’ Connect to My Database

db = New PostgreSQLDatabase
'db.Host = “
db.Host = “123.456.789.10”
db.Port = 5432
db.DatabaseName = “connections”
db.Username = “support”
db.Password = “password”
If db.Connect Then
hb = True
MsgBox(“Not Connected”)
hb = False

This code runs on session startup.
If I set the db.Host to the DNS name – the program aborts. (core dump).
If I set the db.Host to the IP-Address – the program runs fine.

The host system for the app cannot find “” (not in DNS or /etc/hosts etc.)
So…there’s the “real” problem.
Why doesn’t it just say “Not Connected”. - No reason to core dump about it?

Looks like a good candidate for a feedback case. You’ve tried both 32 & 64 bit builds? I’m yet to have success with MS SQL server plugin with 64 bit builds.

I’m using a 32-bit build. 64-bit requires GLIBC 2.14 or above which isn’t available for my CentOS 6.x host. I’d have to update the entire OS in Cent to support 64-bit builds. I do have a CentOS 7 system I may be able to test from. As a follow-up. I added the server to /etc/hosts so that I can ping the remote Postgres server via DNS. – Sadly the program still aborts when I use the server DNS Name. I figured it was aborting because it didn’t like not being able to resolve to the server IP via DNS – in fact it seems like it just doesn’t like resolving the DNS name even if it is available.

Does crash report show a message or reason?

I haven’t had time to pursue this yet. If I find solid evidence of a Xojo issue I’ll post it here and create a case if applicable. Thanks forum members.

I was about to say I had the same issue this evening… but I see you are using PostgreSQL! I ran into a similar issue with SQLServer - IP address works but DNS name causes a crash. I don’t work with SQLServer very often and I only needed it to do a quick test so I put it down to my own ignorance on the subject, but perhaps there is an issue there!

Always better to use an IP address if you can which avoids a DNS lookup. It may be negligible but depending on network conditions, cache settings, etc. it could add up.