Connect with PostGreSQL

3

I have a *.ini file that connects to my Firebird database, however I need this file now to be configured to connect to PostGreSQL

[IBConnection]
DriverName=Interbase          
Database=192.168.1.30:C:\testes\impressoes.fdb         
RoleName=RoleName         
User_Name=sysdba         
Password=masterkey        
ServerCharSet=             
SQLDialect=3               
ErrorResourceFile=        
LocaleCode=0000         
BlobSize=-1        
CommitRetain=False           
WaitOnLocks=True                     
Interbase TransIsolation=ReadCommited         
Trim Char=False     

What I need is to find out what needs to be changed to connect to PostGreSQL instead of Firebird.

Inside the code is the connection:

ConnectingtoDevart:

However,wheneverItrytoaccesssometabletoverifythattheconnectionisOK,thefollowingerrormessageappears:

IthinkhefoundmyDataBaseright,butIhavenoideawhyhesayssuchatabledoesnotexist

Theerrorthathewaspresentingwasoccurringbecausethetableiswiththenameallincapitalletter,whenputtinginlowercasetheerrordidnotoccuragainbutwhenItrytoaccesssomeinformationofthebankheisaccusinganothererrornow:p>

But this FMTBcdField is not available as a variable format, which I believe is because the error compares to the integer format of the variable.

    
asked by anonymous 07.10.2016 / 20:43

1 answer

2

Friend for the image you posted your application was created using Delphi 7 and it did not support natively connection to PostgreSQL, but there are drivers for dbexpress that add support for the connection to PostgreSQL.

Devart has a drive for dbexpress, you can check here link

Find the version specific to Delphi 7, download it, then close the Delphi IDE and install the drive, so open it again and edit the connection settings by selecting the new option that will appear in the Connection Name that will probably be like PGSQLConnection, then change the parameters to the specifics of your PostgreSQL server.

    
23.10.2016 / 14:49