Android Question jRDC2

Why the log(res.Columns) says "object converted to string. This is probably a programming mistake." And everytime i Debug the program, supposedly it will display the items the data stored in the database, but it didn't. What could be the problem? Can anyone here could help me. Thanks a lot.

i used jRD2 to connect it to mySql xammp. For the database. I used phpMyAdmin.
 

Attachments

  • sample.txt
    4 KB · Views: 200

DonManfred

Expert
Licensed User
Longtime User
Please use File-Export as ZIP in the IDE to export a Project.
 
Upvote 0
Im actually a student. And trying to learn B4a for as a requirement in our course, we need to create a program. And our group decided to create a mobile application, specifically an online e-commerce app and it should have a database. Also an administrator will handle the app to post some products to sell. Then I found this tutorial in youtube and follow everything it says. But then when I debug the program, I encounter that problem.

Is there any recommendation database that is suitable to the project I am creating? It would be a great help for me though. Thank you so much
 
Upvote 0

OliverA

Expert
Licensed User
Longtime User
1)
I view the jRDC in b4j, then I found an error message.
Even though you are using a newer driver (8.0.17) for MySQL, you still are using an old DriverClass configuration in your config.properties of the jRDC2 server. So instead of
B4X:
DriverClass=com.mysql.dbc.Driver
change it to
B4X:
DriverClass=com.mysql.cj.jdbc.Driver
and that warning message will go away.

2)
Why the log(res.Columns) says "object converted to string. This is probably a programming mistake." And everytime i Debug the program, supposedly it will display the items the data stored in the database, but it didn't
res.Columns will not contain the data returned for the jRDC2 server. It is a map of columns and their corresponding position that are returned on a successful query.

3)
There is no output too.
What does this mean? At minimum, you should see something like
Tag: (null), Columns: 0, Rows: 0
in the B4A log window when doing a
B4X:
req.PrintTable(res)

4)
B4X:
Dim cmd As DBCommand = CreateCommand("selectAllItem", Null)
How is selectAllItem set up in your config.properties file?
You need to do some debugging. Check the server logs while sending a query.
We need this to help you more
 
Upvote 0
1)
Even though you are using a newer driver (8.0.17) for MySQL, you still are using an old DriverClass configuration in your config.properties of the jRDC2 server. So instead of
B4X:
DriverClass=com.mysql.dbc.Driver
change it to
B4X:
DriverClass=com.mysql.cj.jdbc.Driver
and that warning message will go away.

2)
res.Columns will not contain the data returned for the jRDC2 server. It is a map of columns and their corresponding position that are returned on a successful query.

3)
What does this mean? At minimum, you should see something like

in the B4A log window when doing a
B4X:
req.PrintTable(res)

4)
B4X:
Dim cmd As DBCommand = CreateCommand("selectAllItem", Null)
How is selectAllItem set up in your config.properties file?

We need this to help you more

Jrdc2 doesn't have problem anymore, also i test its connection with the server using its IP(127.0.0.1:17178/test) and the connection is successful.

The only problem I have now is that in the log of b4a, it says ResponceError. Just like in the image I attached
 

Attachments

  • b4a.png
    b4a.png
    103.5 KB · Views: 188
Upvote 0

aeric

Expert
Licensed User
Longtime User
Always rightclick the error line in the log, copy and paste the text then post your error log instead of screen capture the errors. It will help the forum search engine.
Read this to solve the error:
 
Upvote 0
Top