Android Question Remote Database Connector

Giampiero

Member
Licensed User
Longtime User
I apologize for my bad English, that's why I use an online translator I have tried to understand the functioning of the RDC connector but I didn't get any results. I need to access ms sql server database, I downloaded the driver for sql server from http://jtds.sourceforge.net/, I downloaded the DRC both the server and the client, I configured the config.properties file properties as shown in the tutorial and change the bat RunRLC. At this point start the fix (surely I did not understand well how it works) I use the database and the server on localhost. When I run the bat there's errors in console, but if I run the test as per the tutorial server responds, but I report the following error:

RemoteServer is running (Wed Nov 20 08:39:14 CET 2013) java.sql.SQLException
An attempt by a client to checkout a Connection has timed out.

also I have not clear how does logic level (this is the first time I use a web server) operation of DRC If I have to work with tables in a database of a company and manage such as customer accounts or products like I do?.
I am attaching the file config to see itself is correctly set.
Thank you for the answers that I will be given.



#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


DriverClass=net.sourceforge.jtds.jdbc.Driver
JdbcUrl=jdbc:jtds://127.0.0.1/test
User=sa
Password=comelavecchia
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.create_table=CREATE TABLE animals (\
id INT NOT NULL AUTO_INCREMENT,\
name CHAR(30) NOT NULL,\
image BLOB,\
PRIMARY KEY (id))
sql.insert_animal=INSERT INTO animals VALUES (null, ?,?)
sql.select_animal=SELECT name, image FROM animals WHERE name = ?
 
both on the same computer, the database is called test, port 1433 is open but is not declared in the config file if that's what you mean
 
Upvote 0
I set the port 1433 in the config file
I enabled the tpc on the server Protocol
I set the target in connetcion jdbc driver
but when I do the test I always errors

RemoteServer is running (Thu Nov 21 22:32:14 CET 2013)
java.sql.SQLException: An attempt by a client to checkout a Connection has timed out.
this error on the browser

java.sql.SQLException: The syntax of the connection URL 'jdbc:jtds://127.0.0.1:1
433/test' is invalid.

This error in the console

I also modified the xml file jtds driver


I enclose the three configuration files in a zip file



I hope someone can help me
 

Attachments

Upvote 0
I apologize, i know to be insistent, but I can't run the driver
I changed the config file and the xml file, now no longer answers me the server
I modified the connection string in this way
jdbc:jtds:sqlserver://GIAMPIERO-HP\SQLEXPRESS:1433/test

GIAMPIERO-HP\SQLEXPRESS is the name of the instance of sql server

What can I do?
Thanks to
 
Upvote 0
I have finally solved the problem of sql server, the test to be browser works, but by performing the RemoteServerClient i get the following error Error: org.apache.http.conn.HttpHostConnectException: Connection to http://localhost:17178 refused, which is the reason?
 
Upvote 0
Back
Top