B4J Tutorial jRDC2 - B4J implementation of RDC using JDBC microsoft

Discussion in 'B4J Tutorials' started by Vania Contreras, May 4, 2018.

  1. Vania Contreras

    Vania Contreras Member Licensed User

    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
    Code:
    #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
    Code:
    #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
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice