B4J Tutorial jRDC2 - B4J implementation of RDC using JDBC microsoft

I used the example that Erel published to create my application and connect it to a server database microsft sql server 2008, in principle I used the odbc open source of JTDS but I had the problem that it only reads the first instance installed on the server, being a problem because I have more than one instance, and only read the first intancia that has been installed. later I found the odbc of microsoft and this worked me without problem


Here is the configuration on my server
B4X:
#Lines starting with '#' are comments.
#Backslash character at the end of line means that the command continues in the next line.

#DATABASE CONFIGURATION
#DriverClass=com.mysql.jdbc.Driver
#JdbcUrl=jdbc:mysql://localhost/test?characterEncoding=utf8
User=<user>
Password=<password>
#Java server port
ServerPort=12345

#example of MS SQL Server configuration:
#DriverClass=net.sourceforge.jtds.jdbc.Driver
DriverClass=com.microsoft.sqlserver.jdbc.SQLServerDriver
JdbcUrl=jdbc:sqlserver://<ipaddress;databaseName=<database name>;instanceName=<instance name>

#example of postegres configuration:
#JdbcUrl=jdbc:postgresql://localhost/test
#DriverClass=org.postgresql.Driver

#SQL COMMANDS

sql.get_all_articulos=SELECT ncia,id_articulo,art_descripcion FROM android_articulos
sql.get_disponible=select * from android_disponible
sql.get_traspasos_entrada=select * from android_traspasosEntrada where id_suc_dest=1

and the additional jar that must be placed in the application that already perfectly explains EREL
B4X:
#AdditionalJar:mssql-jdbc-6.4.0.jre8
' depends on your version of sql server
#AdditionalJar:sqljdbc4
P.S. check what version of sql server you will need to download the correct odbc
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…