Error while running the application on another computer

3

I developed an application that at the time of running on my computer the same runs normally but when trying to run the same application on another device the following error appears and I can not access the Database:

Note:Ihavealreadycopiedallthedllsthatarenexttomyprojecttothecomputer,alsocopiedthedbxconnections.inifileandthedbxdrivers.inibuttheerrorpersists,ifyouhaveanyidea

PostgreSQL version is 9.6.0

And the content of DBXConnection is:

[Devart PostgreSQL]     
BlobSize=-1                     
HostName=192.168.1.130                          
DataBase=BancoDados                          
SchemaName=                               
DriverName=DevartPostgreSQL                            
User_Name=postgres                      
Password=masterkey                         
FetchAll=True                   
UseQuoteChar=False                        
EnableBCD=True                     
ServerCharSet=  

DBDrivers Configuration:

[Devart PostgreSQL]                                    
GetDriverFunc=getSQLDriverPostgreSQL                         
LibraryName=dbexppgsql.dll                  
VendorLib=dbexppgsql.dll                  
Database=BancoDados                 
User_Name=postgres                
Password=masterkey                  
ServerCharSet=                         
BlobSize=-1                    

[AutoCommit]                    
False=0                    
True=1

[BlockingMode]                     
False=0                  
True=1

[WaitOnLocks]                       
False=1                           
True=0

[CommitRetain]                              
False=0                        
True=1

[OS Authentication]                              
False=0                          
True=1

[Multiple Transaction]                         
False=0                          
True=1

[Trim Char]                            
False=0                            
True=1

[DB2 TransIsolation]                                
DirtyRead=0                           
ReadCommited=1                              
RepeatableRead=2

[Interbase TransIsolation]                                         
ReadCommited=1                           
RepeatableRead=2

[Oracle TransIsolation]                       
DirtyRead=0                       
ReadCommited=1                                           
RepeatableRead=2

[Informix TransIsolation]                            
DirtyRead=0                          
ReadCommited=1                              
RepeatableRead=2

[MSSQL TransIsolation]                               
DirtyRead=0                 
ReadCommited=1                             
RepeatableRead=2

[SQLDialect]                                        
1=0                                  
2=1                                                
3=2

Code:

procedure TdmDatabase.DataModuleCreate(Sender: TObject);
begin
  SQLConnection.Connected := false;
  SQLConnection.LoadParamsOnConnect := true;
  SQLConnection.AutoClone := false;
  SQLConnection.LoginPrompt := false;
  SQLConnection.LoadParamsFromIniFile('dbxconnections.ini');
  //SQLConnection.LoadParamsFromIniFile('LOCAL_dbxconnections.ini');
  SQLConnection.Connected := true;
end;
    
asked by anonymous 18.11.2016 / 20:13

2 answers

3

I was able to solve the error after the help of the comments and also through the help of the user @Sorack, summarizing I had to change the settings of the file pg_hba.conf and add an entry rule in the Firewall for port 5432, so I was able to access the application from other computers

Changing the pg_hba.conf file:

I've added the following line: host all all 0.0.0.0/0 trust

    
21.11.2016 / 14:33
3

I noticed that the LoadParamsOnConnect property is true in your code. Remove the line that assigns the property value and change in the component to false :

  SQLConnection.LoadParamsOnConnect := false;

Also make sure that the dbExpint.dll file is in your application and that the midas component is registered.

    
21.11.2016 / 14:20