Android Tutorial Remote Database Connector (RDC) - Connect to any remote DB

Status
Not open for further replies.

stefanoa

Active Member
Licensed User
Longtime User
more informations about installation of a java web server?
thanks
 
Last edited:

Tom1s

Member
Licensed User
Longtime User
Hi

Is there any example of reqManager.ExecuteBatch ?

If I want to insert all the local table's rows into the servers table how it can be done?
Can I make a list with list=DBUtils.ExecuteMemoryTable(SQL1,"Select * From table1",Null,0)

And then
reqManager.ExecuteBatch(list,"Upload") ?
 

Eduardo Bardales

Member
Licensed User
Longtime User
Please help me. I have a database (Registros.mdb) in MS SQL Server in local serever (local) without password, with one table "registro_general"
1)I download RDC. and I put this folder in c:
2)the jtds driver I download form net.sourceforge. is "jtds-1.3.1,jar" ,I put the file in the folder C:\RemoteDatabaseConnector\jdbc_driver
3)I configured config.properties :
**********************************************************************
#Lines starting with '#' are comments.
#Backslash character at the end of line means that the command continues in the next line.

#SQL Server
DriverClass=net.sourceforge.jtds.jdbc.Driver
JdbcUrl=jdbc:jtds:sqlserver://localhost/Registros?CharacterEncoding=utf8
User=root
Password=
ServerPort=17178
#If Debug is true then this file will be reloaded on every query.
#This is useful if you need to modify the queries.
Debug=true

#commands
sql.insert_registro_general=INSERT INTO registro_general VALUES (null, ?,?,?,?,?,?,?,?,?)

************************************************************************
4) I granted permission to port 17178 on the firewall of windows
5) I modified the path to the java exe file in RUNRCL.bat
*****************************************************************
"C:\Program Files (x86)\Java\jdk1.8.0_45\bin\java" -Xmx256m -cp .;libs\*;jdbc_driver\* anywheresoftware.b4a.remotedatabase.RemoteServer
pause
****************************************************************
5) to run the file RunRLC, stays in execution
6) when I try in the web with this:
http://127.0.0.1:17178/?method=test
the result is:

RemoteServer is running (Fri Jun 19 15:07:58 COT 2015)
java.sql.SQLException: Connections could not be acquired from the underlying database!

Waiting for yor help!

Eduardo
 

Eduardo Bardales

Member
Licensed User
Longtime User
Ah Ok, apologies!!, the extension is mdf. but still with the same problem. I put an user and password in the database and change the port to 1433 and my database has remote access permission too.
*************************************************
#Lines starting with '#' are comments.
#Backslash character at the end of line means that the command continues in the next line.

#DriverClass=com.mysql.jdbc.Driver
#JdbcUrl=jdbc:mysql://localhost/test?characterEncoding=utf8

#SQL Server
DriverClass=net.sourceforge.jtds.jdbc.Driver
JdbcUrl=jdbc:jtds:sqlserver://(local)/Registros
User=sa
Password=Siesac2016
ServerPort=1433
#If Debug is true then this file will be reloaded on every query.
#This is useful if you need to modify the queries.
Debug=true

#commands
sql.insert_registro_general=INSERT INTO registro_general VALUES (null, ?,?,?,?,?,?,?,?,?)
#sql.select_animal=SELECT name, image FROM animals WHERE name = ?
******************************************************
thanks for your answer.
 

Eduardo Bardales

Member
Licensed User
Longtime User
Ok Erel I change the settings: but the problem continues.
**********************************************
#SQL Server
DriverClass=net.sourceforge.jtds.jdbc.Driver
JdbcUrl=jdbc:jtds:sqlserver://(local)/Registros
User=sa
Password=Siesac2016
ServerPort=17178
************************************************
 

Attachments

  • error.png
    11.6 KB · Views: 410

Tom1s

Member
Licensed User
Longtime User
Hi
This is working with my sql server 2008:

#Lines starting with '#' are comments.
#Backslash character at the end of line means that the command continues in the next line.

#DriverClass=com.mysql.jdbc.Driver
#JdbcUrl=jdbc:mysql://localhost/test?characterEncoding=utf8

#SQL Server
DriverClass=net.sourceforge.jtds.jdbc.Driver

JdbcUrl=jdbc:jtds:sqlserver://127.0.0.1:1433/db
User=
Password=
ServerPort=17178
#If Debug is true then this file will be reloaded on every query.
#This is useful if you need to modify the queries.
Debug=true
 
Last edited:

Eduardo Bardales

Member
Licensed User
Longtime User
Tks Tom. I am working under Windows 8.1. The file .jar that I use is: jtds-1.3.1.jar ??, but I change the settings: and the problem continues.
I put the table and not the database ?
I'm working with SQL Server express 2008 R2

Again tks!

**************************************************
#SQL Server
DriverClass=net.sourceforge.jtds.jdbc.Driver
#Registros is de database that contains only one table "registro_general"
JdbcUrl=jdbc:jtds:sqlserver://127.0.0.1:1433/Registros
User=sa
Password=Siesac
ServerPort=17178
#If Debug is true then this file will be reloaded on every query.
#This is useful if you need to modify the queries.
Debug=true
 

Tom1s

Member
Licensed User
Longtime User
Database of course sorry for that. I googled some time looking for sql connection problems. I had to verify the port and i made a new user. I am not using the default sa user.
I can't remember the file version but i can check. Mine is w7 u sqlsrv 2008r2.
 

Eduardo Bardales

Member
Licensed User
Longtime User
The file RunRLC.BAT show the next message:
WARNING: Having failed to acquire a resource, com.mchange2.v2resourcepool.basicResourcePool@11efa63 is interrupting all treads waiting on a resource to check out. Will try again in response to new client requiests.

Wath resource????
 

juventino883

Member
Licensed User
Longtime User
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…