RDC newbie here ...
With the forum's help I got the jRDC Server running on my remote server:
http://ctt.wvhops.com:17178/test
RemoteServer is running (11/15/2017 05:08:39)
Connection successful.
However, my first attempt to execute an SQL statement shows this in the b4A log:
*** Service (httputils2service) Create ***
** Service (httputils2service) Start **
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>Error 404 Not Found</title>
</head>
<body><h2>HTTP ERROR 404</h2>
<p>Problem accessing /. Reason:
<pre> Not Found</pre></p><hr><a href="http://eclipse.org/jetty">Powered by Jetty:// 9.4.z-SNAPSHOT</a><hr/>
</body>
</html>
Error: Not Found
** Activity (main) Pause, UserClosed = false **
Modified RemoveServerClient as follows:
config.properties stuff:
#DATABASE CONFIGURATION
DriverClass=com.mysql.jdbc.Driver
JdbcUrl=jdbc:mysql://localhost/test?characterEncoding=utf8
#SQL COMMANDS
#sql.create_table=CREATE TABLE IF NOT EXISTS animals (\
# id INTEGER PRIMARY KEY AUTO_INCREMENT,\
# name CHAR(30) NOT NULL,\
# image BLOB)
#sql.insert_animal=INSERT INTO animals VALUES (null, ?,?)
#sql.select_animal=SELECT name, image, id FROM animals
sql.create_table=CREATE TABLE article (col1 numeric(10,4) ,col2 text);
sql.select=select * from article
sql.insert=INSERT INTO article VALUES(?, ?)
sql.SelectAllCustomers=SELECT CustID FROM customers
I imagine solution is something simple but I cannot find it.
Marc
With the forum's help I got the jRDC Server running on my remote server:
http://ctt.wvhops.com:17178/test
RemoteServer is running (11/15/2017 05:08:39)
Connection successful.
However, my first attempt to execute an SQL statement shows this in the b4A log:
*** Service (httputils2service) Create ***
** Service (httputils2service) Start **
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>Error 404 Not Found</title>
</head>
<body><h2>HTTP ERROR 404</h2>
<p>Problem accessing /. Reason:
<pre> Not Found</pre></p><hr><a href="http://eclipse.org/jetty">Powered by Jetty:// 9.4.z-SNAPSHOT</a><hr/>
</body>
</html>
Error: Not Found
** Activity (main) Pause, UserClosed = false **
Modified RemoveServerClient as follows:
B4X:
Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then
' reqManager.Initialize(Me, "http://192.168.0.100:17178")
reqManager.Initialize(Me, "http://ctt.wvhops.com:17178")
End If
End Sub
Sub Activity_Click
' GetAnimal("1")
GetCustomers
End Sub
Sub GetCustomers
Dim cmd As DBCommand
cmd.Initialize
cmd.Name = "SelectAllCustomers"
cmd.Parameters = Array As Object()
reqManager.ExecuteQuery(cmd, 0, Null)
End Sub
config.properties stuff:
#DATABASE CONFIGURATION
DriverClass=com.mysql.jdbc.Driver
JdbcUrl=jdbc:mysql://localhost/test?characterEncoding=utf8
#SQL COMMANDS
#sql.create_table=CREATE TABLE IF NOT EXISTS animals (\
# id INTEGER PRIMARY KEY AUTO_INCREMENT,\
# name CHAR(30) NOT NULL,\
# image BLOB)
#sql.insert_animal=INSERT INTO animals VALUES (null, ?,?)
#sql.select_animal=SELECT name, image, id FROM animals
sql.create_table=CREATE TABLE article (col1 numeric(10,4) ,col2 text);
sql.select=select * from article
sql.insert=INSERT INTO article VALUES(?, ?)
sql.SelectAllCustomers=SELECT CustID FROM customers
I imagine solution is something simple but I cannot find it.
Marc