In a previous post (B4J Connection to Database Example…) I demonstrated through a very simple application how to connect within a B4J application to a SAP SQL Anywhere Database. It’s not always easy to find how we can connect to a database. This is because, when connecting to a database using JDBC, we have to know which driver we will use and also the required JDBC URL to communicate with the database server. This information isn’t always easy to find, as they are different versions of clients, and each database client may have different driver & settings!
As mentioned in the title, this time I will give an example of a connection to a SAP ASE Database. Currently, I will be testing the connectivity to versions 15.7 and 16.0 of the product. As with any database, the first thing we need to check is that the JDBC driver option of the client was checked and installed during client’s installation (this can be done through control panel add/remove programs option). The second is to copy two files to out Additional Libraries folder (this path is declared in B4J IDE as shown in the following screenshot).
The files needed to be place there are: