after tested a few framework for cross platform app development tool, shortlisted Flutter/Dart & B4X/B4J. I am able to get the flutter to connect to a localhost postgresql database and hoping to do the same for B4J. After going thru 7 pages of PostgreSQL related thread using the search tool, downloaded few jar for postgresql, using Bing AI, Bard AI yet i couldnt get it connect to my test postgresql database (even got the config.properties file up).
I am coming from MS Access (self-taught) and B4J will be more familiar for me than flutter, and hope to embark with B4J to port my access program over to postgresql + B4J. I got the AdditionalLibs path (D:\B4X\AdditionalLibs) set up on config path, downloaded the required jar (postgresql-9.4.1212.jre7.jar & postgresql-42.6.0.jar) and now i need some senior members to help write a test connection to my localhost postgresql database. The closest i can get is still with the error saying: " Waiting for debugger to connect... Program started. Error: java.lang.RuntimeException: Class not found: jdbc: postgresql://localhost:5432/hp_app?user=postgres&password=Demo1234 & Are you missing an #AdditionalJar attribute setting?"
I will be grateful and thankful for this guide to get it connected to further my assessment for the porting project. Many thanks for your time reading and helping a newbie to some hands-on. Shalom!
config.properties:
DriverClass=org.postgresql.Driver
JdbcUrl=jdbc:postgresql://localhost/hd_app?characterEncoding=utf8
User=postgres
Password=Demo1234
ServerPort=5432
I am coming from MS Access (self-taught) and B4J will be more familiar for me than flutter, and hope to embark with B4J to port my access program over to postgresql + B4J. I got the AdditionalLibs path (D:\B4X\AdditionalLibs) set up on config path, downloaded the required jar (postgresql-9.4.1212.jre7.jar & postgresql-42.6.0.jar) and now i need some senior members to help write a test connection to my localhost postgresql database. The closest i can get is still with the error saying: " Waiting for debugger to connect... Program started. Error: java.lang.RuntimeException: Class not found: jdbc: postgresql://localhost:5432/hp_app?user=postgres&password=Demo1234 & Are you missing an #AdditionalJar attribute setting?"
almost but not there:
#AdditionalJar: postgresql-42.6.0.jar
Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Private pgSQL As SQL
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.Show
Try
Dim connectionString As String = "jdbc:postgresql://localhost:5432/hp_app?user=postgres&password=Demo1234"
pgSQL.Initialize(connectionString, "hp_app")
Log("Connection successful!")
Catch
Log("Error: " & LastException.Message)
End Try
End Sub
Sub MainForm_CloseRequest (EventData As Event)
pgSQL.Close
End Sub
I will be grateful and thankful for this guide to get it connected to further my assessment for the porting project. Many thanks for your time reading and helping a newbie to some hands-on. Shalom!