Android Question JRDC connection Error

amarnath

Member
Licensed User
Longtime User
Config file

#DATABASE CONFIGURATION
DriverClass=com.mysql.jdbc.Driver
JdbcUrl=jdbc:mysql://localhost/dairychairman?charactereEncoding=utf8
User=root
Password=
#Java server port
ServerPort=17178
---------------------
I have use this jar file
#AdditionalJar: mysql-connector-java-5.1.34-bin


PackageAdded: package:b4a.example
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create (first time) **
Call B4XPages.GetManager.LogEvents = True to enable logging B4XPages events.
*** Receiver (httputils2service) Receive (first time) ***
** Activity (main) Resume **

ResponseError. Reason: java.net.UnknownServiceException: CLEARTEXT communication to 192.168.38.229 not permitted by network security policy, Response:
ERROR: java.net.UnknownServiceException: CLEARTEXT communication to 192.168.38.229 not permitted by network security policy
 

Attachments

  • jserver.png
    jserver.png
    36.3 KB · Views: 91
  • local.png
    local.png
    18.8 KB · Views: 93

JohnC

Expert
Licensed User
Longtime User
Upvote 1

JohnC

Expert
Licensed User
Longtime User
Upvote 0

amarnath

Member
Licensed User
Longtime User
What I need to do is to use this connection on every page
Getting issue now when I have multiple activity.
 
Upvote 0

josejad

Expert
Licensed User
Longtime User
Getting issue now when I have multiple activity.
Upload a small example showing your problem.
Paste the error your getting from the logs (as text, not as images)

Check if this post can help you
 
Upvote 0

amarnath

Member
Licensed User
Longtime User
Upload a small example showing your problem.
Paste the error your getting from the logs (as text, not as images)

Check if this post can help you
I have done it as you suggested and it is working fine.

sorry for my ignorance .

I am not able to add another page.
If so, can you please provide a sample of one four to five page work done in jrdc2

I have been trying for a long time. It would be great if you could give me a sample like this
 
Upvote 0

josejad

Expert
Licensed User
Longtime User
Have you tried the sample I provided? JRDC2 is in a class, so you can use it in every page you want.
Sorry, I have no other examples
 
Upvote 0

josejad

Expert
Licensed User
Longtime User
It is showing error page one
Sorry I can't help with so few info.
Please, open a new thread as your main question have been solved (CLEARTEXT) and upload a small project or show your error logs as text and your code.
And please, mark answer 2 as solution (upvote it)

Thanks
 
Upvote 0

amarnath

Member
Licensed User
Longtime User
Sorry I can't help with so few info.
Please, open a new thread as your main question have been solved (CLEARTEXT) and upload a small project or show your error logs as text and your code.
And please, mark answer 2 as solution (upvote it)

Thanks
thanks to reply
 
Upvote 0

amarnath

Member
Licensed User
Longtime User
I am using this query in jrdc2 but it is not working properly
...
Please tell the correct query
sub countno()
Dim sr As Double = 0
Private query1 As String
Private cursor1 As Cursor

query1="Select COUNT(transcode) as sr from user"
cursor1=Starter.SQL1.ExecQuery(query1)
cursor1.Position=0

sr=cursor1.GetString2(0)
TxtSrno.Text = sr + 1
' TxtSrno.Text=Round2(TxtSrno.Text,0)
TxtSrno.Text=NumberFormat(TxtSrno.Text,0,0)
end sub
 
Upvote 0

josejad

Expert
Licensed User
Longtime User
Please, open a new thread as your main question have been solved (CLEARTEXT) and upload a small project or show your error logs as text and your code.
 
Upvote 0

josejad

Expert
Licensed User
Longtime User
Upvote 0

amarnath

Member
Licensed User
Longtime User
config file
sql.logins = SELECT count(*) as idcount FROM b4x_users;
------
Sub Getcount

Dim req As DBRequestManager = CreateRequest
Dim cmd As DBCommand = CreateCommand("logins", Null)
Wait For (req.ExecuteQuery(cmd, 0, Null)) JobDone(j As HttpJob)
If j.Success Then
req.HandleJobAsync(j, "req")
Wait For (req) req_Result(res As DBResult)
'work with result
req.PrintTable(res)
Log("---")
Else
Log("ERROR: " & j.ErrorMessage)
End If
j.Release
end sub
----------

log

Tag: null, Columns: 1, Rows: 1
idcount
4
my requirment

result =4
I want this output in text box
txt_idcount.text=4 ?????????????????
 
Upvote 0

amarnath

Member
Licensed User
Longtime User
Well, you ignore my posts... so, here is the last one
sorry sir.
Sir I was working in B4A in 2017
Little is noticed as it has not worked for many days
at that time I worked in Sqlite.
.

I only have knowledge of vb.net.
Now B4X has undergone a lot of changes, so it is notnoticed early.

I hope you can solve my problem.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
I only have knowledge of vb.net.
Now B4X has undergone a lot of changes, so it is notnoticed early.

I hope you can solve my problem.
Don´t use bold text. It just makes the text less readable.
If you worked with B4A 7 years ago then start watch the suggested video and learn.


Video about jRDC2:

Also note that you must install a new SDK together with the newest B4A Version. The SDK has changed last year.
 
Upvote 0

josejad

Expert
Licensed User
Longtime User
I hope you can solve my problem
so please... create a new thread, and upload your project, it's difficult to help this way.

Have you checked and tried to understand the example I posted?


Have you seen the video I posted from Erel to see how to work with a DBResult object?

You're mixing in a single post several problems, sometimes you say "now it works", later you ask a different thing... please, create a new thread with your problem, and upload your project, it will make easier to help you.
 
Upvote 0
Top