B4J Question [B4X] jRDC2 - To use another db server where to modify the code?

amorosik

Well-Known Member
Licensed User
For use with Microsoft Sql Server, Postresql, Firebird, and so on, where is it necessary to change the code to keep it working correctly?
 

José J. Aguilar

Expert
Licensed User
As the instructions says:

1. Add the relevant JDBC jar file to the additional libraries folder. (you have to get the appropiate one)
2. Add a reference to this jar
3. Edit config.properties file that is located in the Files tab. You have examples to setup mssql, mysql...

Changing those 3 things, you change the database type you access.
 
Upvote 0

AymanA

Active Member
Licensed User
For postgres as an example:

Add the relevant JDBC jar file to the additional libraries folder -->download it from here: https://jdbc.postgresql.org/

In Main module insert:
#AdditionalJar: postgresql-42.2.19.jar - use the version number you will download

In the config.properties:

config.properties file:
DriverClass=org.postgresql.Driver
JdbcUrl=jdbc:postgresql://<Server_domain_or_ip>/<DB_Name>?characterEncoding=utf8
User=<DB_UserName>
Password=<DB_Password>
ServerPort=<Server_port>
 
Upvote 0
Top