B4J Question SQL Error handling

Topwiz

Member
Licensed User
Longtime User
I am working on my first database app in the B4J/B4A world. My primary programming environment is Classic ASP/Vbscript or PowerBuilder.

I have my B4J app connecting to Microsoft SQL Server and populating a TableView control using DBUtils module.

My question is how do I code proper error handling? If the password on sql1.Initialize is wrong, I don't want it to show a bunch of Java error messages that will scare the user. I want to show a nice msgbox. Same thing when executing a query, how do I code error handling?
 

Topwiz

Member
Licensed User
Longtime User
Could you tell me why the sql interface jar has to be listed with #AdditionalJar in Project Attributes but jfxtras-labs-2.2-r5.jar or jMsgboxes.jar do not. All three are in my Additional Libraries folder.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Msgbox isn't built-in because it is based on another (quite large) library. Hopefully dialogs will be added in the next version of JavaFX.

Could you tell me why the sql interface jar has to be listed with #AdditionalJar in Project Attributes but jfxtras-labs-2.2-r5.jar or jMsgboxes.jar do not. All three are in my Additional Libraries folder.
When you build a library you can hardcode references to other jar files. However in the case of SQL, you can use all kinds of jars with it, depending on the SQL engine. So you need to tell the compiler which jar to add.
 
Upvote 0
Top