How can I catch wrong host name ?????
The code below catch Error, but have no ANI INFO about error....
In IDE I see SockeException Error
Code: Select all
if (!cbDatabase->Items->Count)
{
PgConnection1->Username = edUsername->Text;
PgConnection1->Password = edPassword->Text;
PgConnection1->Server = edServer->Text;
// PgConnection1->Port = udPort->Position;
PgConnection1->Database = "template1";
PgConnection1->GetDatabaseNames(cbDatabase->Items);
try
{
PgConnection1->PerformConnect(false);
}
catch (EPgError &E)
{
ShowMessage("Error is " + E.DetailMsg);
}
}