For last weeks our customers notify us a problem with connecting to the local Firebird database, when computer has no internet access.
Database: Firebird 2.5.9 and Firebird 3.0.x, located on local machine
Unidac: the newest version, but also in previous realease.
Delphi 11, Enterprise.
When the user tries to connect database, he receives the error: Socket Error #11001 or "Could not locate host machine".
When internet is on, there are no problems with connection.
I tried to reproduce on my machine, but everything works ok here.
Maybe I have changed something in connection settings, but I cannot find any differences.
Could it be connected to the last Delphi release (11) or Windows update?
For many years we haven't got this error.
Thanks in advance!
Socket Error #11001
Re: Socket Error #11001
Is it possible, that "no internet access" really means "no access to router" which includes no access to DNS?
Re: Socket Error #11001
It is possible. But is DNS configuration required to connect, when the database and the program are on the same machine?
Re: Socket Error #11001
Hi Andy!
In order to eliminate the error with DNS, you can try to specify an explicit IP address of the machine on which the database server is located.
If the database server and the program are on the same machine, also specify the IP address of the machine and inform us of the results.
In order to eliminate the error with DNS, you can try to specify an explicit IP address of the machine on which the database server is located.
If the database server and the program are on the same machine, also specify the IP address of the machine and inform us of the results.
-
- Posts: 1
- Joined: Wed 11 May 2022 09:18
Re: Socket Error #11001
Hi Andypavelpd wrote: ↑Tue 10 May 2022 14:07 Hi Andy!
In order to eliminate the error with DNS, you can try to specify an explicit IP address of the machine on which the database server is located.
If the database server and the program are on the same machine, also specify the IP address of the machine and inform us of the results.
You can do as Pavelpd instructs. I tried again and the error was fixed. dinosaur game
Re: Socket Error #11001
Thank you all for replies and advices.
Finally I discovered the problem. It was not connected to Unidac components at all.
Just after connection I need to read real time.
I check, if the internet is available:
function IsInternetConnection: Boolean;
var
Flags: DWORD;
begin
Flags := INTERNET_CONNECTION_MODEM or INTERNET_CONNECTION_LAN or
INTERNET_RAS_INSTALLED or INTERNET_CONNECTION_PROXY or INTERNET_CONNECTION_MODEM_BUSY;
Result := InternetGetConnectedState(@Flags, 0); // Test connection
end;
If the connection is available, I read current time from the SNTP server.
However sometimes the function IsInternetConnection returns True even if the internet is off.
Then I try to call Sntp Server and I receive Socket Error!
Sorry for bothering you and thanks for all the answers!
Finally I discovered the problem. It was not connected to Unidac components at all.
Just after connection I need to read real time.
I check, if the internet is available:
function IsInternetConnection: Boolean;
var
Flags: DWORD;
begin
Flags := INTERNET_CONNECTION_MODEM or INTERNET_CONNECTION_LAN or
INTERNET_RAS_INSTALLED or INTERNET_CONNECTION_PROXY or INTERNET_CONNECTION_MODEM_BUSY;
Result := InternetGetConnectedState(@Flags, 0); // Test connection
end;
If the connection is available, I read current time from the SNTP server.
However sometimes the function IsInternetConnection returns True even if the internet is off.
Then I try to call Sntp Server and I receive Socket Error!
Sorry for bothering you and thanks for all the answers!
Re: Socket Error #11001
Hi!
We are glad to see that you have found the reasons of the Socket Error #11001.
Please feel free to contact us if you have any further questions regarding our products.
We are glad to see that you have found the reasons of the Socket Error #11001.
Please feel free to contact us if you have any further questions regarding our products.