Android Question RDC Problem Accessing Not Found

Michael Mc

Member
Licensed User
Longtime User
Trying to make a RDC connection and keep getting 'Not Found Errors on select_t sql statement.

Firewall is open on port 17178

Running /test returns connection successful

But unable to run select_t

MySQL servers is at 192.168.0.35 My computer where the jRDC is running is on 192.168.0.167

I've tried:
JdbcUrl=jdbc:mysql://192.168.0.35/taskit?characterEncoding=utf8
JdbcUrl=jdbc:mysql://192.168.0.35:3306/taskit?characterEncoding=utf8
JdbcUrl=jdbc:mysql://192.168.0.35:3306/taskit
JdbcUrl=jdbc:mysql://192.168.0.35/taskit

I can access my database using other methods fine. Any Ideas?

Code within B4A:

B4X:
Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    'Activity.LoadLayout("Layout1")
If FirstTime Then
    reqManager.Initialize(Me,"http://192.168.0.167:17178")
End If

Dim cmd As DBCommand
cmd.Initialize
cmd.Name="select_t"
cmd.Parameters=Array As Object("n1")
    reqManager.ExecuteQuery(cmd,0,"n1")

End Sub

Sub JobDone(Job As HttpJob)
    If Job.Success = False Then
        Log("Error: " & Job.ErrorMessage)
    Else
        If Job.JobName = "DBRequest" Then
            reqManager.HandleJobAsync(Job, "ReqManager")
        End If
    End If
    Job.Release
End Sub

Sub ReqManager_Result(result As DBResult)
    For Each records() As Object In result.Rows
        Dim name As String = records(1)
        Log(name)
       
    Next
    'work with result
End Sub


Here is my configuration file:

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://192.168.0.35/taskit?characterEncoding=utf8
User=root
Password=admin
#Java server port
ServerPort=17178

#example of MS SQL Server configuration:
#DriverClass=net.sourceforge.jtds.jdbc.Driver
#JdbcUrl=jdbc:jtds:sqlserver://<server address>/<database>

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

#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.select_t=select id,name from test
sql.create_table=CREATE TABLE article (col1 numeric(10,4) ,col2 text);
sql.select=select * from article
sql.insert=INSERT INTO article VALUES(?, ?)

Using:
 

Alexander Stolte

Expert
Licensed User
Longtime User
Upvote 0

Alexander Stolte

Expert
Licensed User
Longtime User
reqManager.Initialize(Me,"http://192.168.0.167:17178")
this is wrong.

this is right.
B4X:
http://192.168.0.167:17178/yourRdcName

this is in your b4j code on the first page:
B4X:
srvr.AddHandler("/test", "TestHandler", False)
    srvr.AddHandler("/yourRdcName", "RDCHandler", False)
 
Upvote 0

Michael Mc

Member
Licensed User
Longtime User
this is wrong.

this is right.
B4X:
http://192.168.0.167:17178/yourRdcName

this is in your b4j code on the first page:
B4X:
srvr.AddHandler("/test", "TestHandler", False)
    srvr.AddHandler("/yourRdcName", "RDCHandler", False)

Thank you.... Thank You! It works now!!

Somewhere I must have missed this.

I appreciate your time. Regards...
 
Upvote 0
Top