I can create DBs on my local PG with the following code:
Code: Select all
function TDMDBConnection.CreateNewDB(aNewDBName: string): Boolean;
begin
  PgConnection1.ExecSQL('CREATE DATABASE '+aNewDBName+';');
end;
I can confirm I can create remote DB via pgAdmin III and Putty via SSH tunnel.
I suppose the issue is one or more properties I have to set for one or more of these three components:
Code: Select all
  object PgConnection1: TPgConnection
    Username = 'xxxxxxx'
    Server = 'localhost'
    LoginPrompt = False
    Database = 'xxxxxxx'
    Port = 5440
    Options.UseUnicode = True
    Left = 232
    Top = 8
    EncryptedPassword = 'xxxxxxx'
  end
  object ScSSHClient1: TScSSHClient
    HostKeyAlgorithms = <
      item
        Algorithm = aaRSA
      end
      item
        Algorithm = aaDSA
      end>
    HostName = 'xxxxxxx'
    Port = 7822
    User = 'xxxxxxx'
    Password = 'xxxxxxx'
    Timeout = 10
    KeyStorage = ScFileStorage1
    OnServerKeyValidate = ScSSHClient1ServerKeyValidate
    Left = 136
    Top = 85
  end
  object ScFileStorage1: TScFileStorage
    Password = 'xxxxxxx'
    Left = 208
    Top = 77
  end
  object ScSSHChannel1: TScSSHChannel
    Client = ScSSHClient1
    SourcePort = 5440
    DestHost = 'xxxxxxx'
    DestPort = 5432
    Timeout = 10
    Left = 296
    Top = 77
  endMany thanks
Pio Pio