Share My Creation [BANanoVuetifyAD3] BANanoServer - DirectMSSQL CRUD

Hi there...

Download

BANanoMySQLDirect.jpg


DataSource Database Settings

1636332774514.png



Option 1: Use jdts

In Main Add:
B4X:
#AdditionalJar: jtds-1.3.1.jar

This can be used with

B4X:
Dim jdbcUrl As String = $"jdbc:jtds:sqlserver://${serverIP}:${serverPort}/${serverDB};instance=SQLEXPRESS"$
pool.Initialize("net.sourceforge.jtds.jdbc.Driver", jdbcUrl, login, password)
SQLx = pool.GetConnection

Option 2: Use MS Drivers

Download drivers specific to the java version you use:

For example, for java 8, the file will have 8, for 11, the file will have 11 etc.

This can be used with

B4X:
Dim jdbcUrl As String = $"jdbc:sqlserver://${serverIP};instance=SQLEXPRESS:${serverPort};databaseName=${serverDB}"$
pool.Initialize("com.microsoft.sqlserver.jdbc.SQLServerDriver", jdbcUrl, login, password)
SQLx = pool.GetConnection

This project is using Option 2 and I am using java 8, so in Main I have added

B4X:
#AdditionalJar:mssql-jdbc-9.4.0.jre8.jar

Other Steps

1. FireWall should be opened for your port e.g. 1433
2. Go to Computer Management > Services & Applications > SQL Server Configuration Manager > Protocols for SQLExpress
2. 1. Ensure the TCP/IP is 'Enabled'
2. 2. Double Click TCP/IP, on the tabs select IP Addresses, ensure that IPAll TCP/IP is set to 1433.

1636332154852.png


2.3. Also ensure you have user permissions for your SQL Server Installation, usually its better to set both Windows & SQL Server Authentication

1636332271662.png



 
Last edited:
  • Love
Reactions: LJG
Top