3
I developed an application that when running in my computer the same runs normally but when trying to run the same application in other equipment the following error appears and I can’t access the database:
Note: I already copied all the dll’s that are next to my project to the computer, I also copied the dbxconnections.ini and dbxdrivers.ini files but the error persists if you have any idea
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=
Configuration Dbdrivers:
[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;
The
SQLConnection
is disabled, and it will only be enabled when opening the system, configuring the database correctly? Or maybe you forgot the connected component, generating the error...– Andrey
@Andrey It is the SQL Connection would open only inside the application, in which case I would have to open it from the beginning alone?
– R.Santos
I think my comment got a little confused even, the right thing is to just connect it when opening the application. link
– Andrey
@Andrey because it is I tried to do what the link suggested but the error persisted
– R.Santos
The bank is
FireBird
? Is it installed on the machine? You may need to copy theFBClient.dll
– Andrey
The database is Postgresql, and the database is only installed on my machine, so when I try to open the application on another machine the error message occurs, on my machine the error does not occur
– R.Santos
Let’s go continue this discussion in chat.
– Andrey
@Andrey I identify the database in the sql Connection component where I place the IP from where the database is installed, that would be right enough?
– R.Santos
If possible, please post the connection routine with the database, and the contents of dbxconnection. And also inform which version of Postgresql you are using ?
– Victor Tadashi
@Victorzanella I edited the question with the information you requested
– R.Santos
@Victorzanella I also put as this configured the Dbxdrivers, I believe this also has importance
– R.Santos
Please post the code part of your application where you connect the component to the bank. Ex.:
SQLConnection.Connected := True
. Post all the block where you do the above operation.– Andrey
@Andrey I edited the question with the part you asked
– R.Santos
Strange that you didn’t put the port, and it worked. Have you tried to put the default port on the Host? Ex.: Hostname=192.168.1.130:5432
– Victor Tadashi
Would that be just on Dbxconnection.ini @Victorzanella? As I edited the file only however the error persists on another computer, name worked normally
– R.Santos
I can’t tell you for sure. because Voce implements the parameters in Design Time, Runtime and Dbxconnection. You should only use one of them. For the test, put in Designtime and Dbxconnection
– Victor Tadashi
@Victorzanella I edited in the places you commented and the mistake became:
dbExpress Error: Invalid Username/password
That’s when I try to access on another computer– R.Santos
It seems to me (I’m not sure) that your user and password are the standards of postgresql. I suggest you change this as soon as possible. To continue testing, it removes the Username and password from Dbxconnetion and the Sqlconnection component. If this does not work, try to change the user and password of the bank, and just put it in the code. Bank Password can never stay in an open file like dbxconnection.
– Victor Tadashi