Android Question JDBC Server kinda stops

David Elkington

Active Member
Licensed User
Hi All,

I have an app now which is up and working and is sending data back to a "Server" which is SQL Server and JDBC in the middle. It seems to work well, except every so often it freezes and the tablets cannot send to the server any longer.

Is there a way of configuring the server to deal with high volumes, or a "reset" which can be run every now and then? When I close down the server and start it again, it starts receiving data again, but I really want a stable system as there will be 600 tablets connecting to this when live.. I have included a screen shot of my screen, sometimes the requests are super fast and other times they can take over a second.

I would like this system to have lots of small updates rather than batches.

Thanks

David
 

Attachments

  • Screen Shot 2017-03-14 at 15.55.04.png
    Screen Shot 2017-03-14 at 15.55.04.png
    330.6 KB · Views: 144

David Elkington

Active Member
Licensed User
Hi Erel,

It is tracking the people and events in real time to let the company know what each of the staff are up to so it needs to be granular. I'm not using jRDC2 I believe, just the first version but I am not certain. How do I find out what I am using? It works really well until it stops, and then I have to start the batch file again and eventually the PC it is running on.

I am using jtds as I am working with SQL Server 2012 Express and this is my startup Line..

C:\Program Files\Java\jdk1.8.0_111\bin\java" -Xmx256m -cp .;libs\*;jdbc_driver\* anywheresoftware.b4a.remotedatabase.RemoteServer
JdbcUrl=jdbc:jtds:sqlserver://localhost:1433/transport;instance=

I will be installing a production server very soon, this is just test with 50 people on it at the moment, so would like to get it right from the beginning.
 
Upvote 0

David Elkington

Active Member
Licensed User
HI Erel,

I just updated my app to the 2nd version but now it seems to be giving errors on the Server as attached. Have I missed something?
 

Attachments

  • Screen Shot 2017-03-15 at 08.56.08.png
    Screen Shot 2017-03-15 at 08.56.08.png
    182 KB · Views: 134
Upvote 0

David Elkington

Active Member
Licensed User
SOrry, I think I am getting confused. I changed my code in the app and changed the dbrequestmanager.bas file to the one in the post. It says I need to replace the code on the server with the code attached too, where do I put that? In the directory where I have the RunRLC and Config files, I cannot see anything like the contents of the Zipt file (jrdc2.zip)?
 
Upvote 0

David Elkington

Active Member
Licensed User
Ok, I have set up my server on a different port and run it. It seems to be running. I have changed my code to try and connect and it does nothing, nothing in the log file...

I ran it in debug and it seems to fall over here... on the mTarget line.

Public Sub Initialize (Target As Object, ConnectorLink As String)
mTarget = Target
link = ConnectorLink
End Sub

This is the line I am using,

reqManager.Initialize(Me, SQLStat.ExecQuerySingleResult("Select par_jServer_IP from Parameters where par_id=1"))

The value in the table is http://91.192.211.98/rdc:17179

Is there anything obvious I am doing wrong? I am not sure why it would fail there, the code is in the start module.
 

Attachments

  • Screen Shot 2017-03-15 at 14.58.01.png
    Screen Shot 2017-03-15 at 14.58.01.png
    213 KB · Views: 123
Upvote 0

David Elkington

Active Member
Licensed User
Well, it looks like it has found the server now, but it gives me an issue that it cannot load the driver class....

This is my connection line which I used in my RDC before, I am guessing there is something wrong here..

DriverClass=net.sourceforge.jtds.jdbc.Driver
JdbcUrl=jdbc:jtds:sqlserver://localhost:1433/transport;instance=RISKASS;user=
 

Attachments

  • Screen Shot 2017-03-15 at 15.25.05.png
    Screen Shot 2017-03-15 at 15.25.05.png
    320.4 KB · Views: 114
Upvote 0

David Elkington

Active Member
Licensed User
Ah ha, it was my jtds file which was not referenced properly, it seems to communicate now... there was a slight issue in the line attached however, is this something I need to worry about?
 

Attachments

  • Screen Shot 2017-03-15 at 15.50.01.png
    Screen Shot 2017-03-15 at 15.50.01.png
    51.7 KB · Views: 137
Upvote 0

David Elkington

Active Member
Licensed User
I have another weird one now, It seems to send data and then crash out. I have narrowed it down to the attached area of code, it seems to crash on a null value. The success seems to be True, but it crashes out here in debug and I guess about there in Release too.
 

Attachments

  • Screen Shot 2017-03-15 at 16.36.40.png
    Screen Shot 2017-03-15 at 16.36.40.png
    263.3 KB · Views: 113
Upvote 0
Top