gpbimal Member May 17, 2020 #1 Dear Developers I want to connect a remote database (mysql) with b4a application. I'm basic in B4A because I'm a VB Developer. I've read jRDC2 - Connect to remote databases from B4A example sites, view in YouTube and follow the given instruction. But I unable to connect my database. I just want b4a code for: 1. Successful connection code for my various remote database. 2. Get data and bind in ListView one by one. 3. Run an Insert query. That's all I can pay $30-40 for this. Please help...
Dear Developers I want to connect a remote database (mysql) with b4a application. I'm basic in B4A because I'm a VB Developer. I've read jRDC2 - Connect to remote databases from B4A example sites, view in YouTube and follow the given instruction. But I unable to connect my database. I just want b4a code for: 1. Successful connection code for my various remote database. 2. Get data and bind in ListView one by one. 3. Run an Insert query. That's all I can pay $30-40 for this. Please help...
Erel B4X founder Staff member Licensed User Longtime User May 17, 2020 #2 gpbimal said: I've read jRDC2 - Connect to remote databases from B4A example sites, view in YouTube and follow the given instruction. But I unable to connect my database. Click to expand... Not enough information for us to help you... Upvote 0
gpbimal said: I've read jRDC2 - Connect to remote databases from B4A example sites, view in YouTube and follow the given instruction. But I unable to connect my database. Click to expand... Not enough information for us to help you...
gpbimal Member May 18, 2020 #3 First of all I'm sorry for my bad English. I can not connect mysql database with b4a project, my database is hosted in https://www.gsddemoz.com , database name is gsddemoz_sp Now, I need an example project with following requirements. 1. Connection with remote MySql database hosted in https://www.gsddemoz.com a. database name = gsddemoz_sp b. table name = userlist 2. I want to bind all users (username is column name) in ListView. 3. I want to add a new username in userlist table. If I get the B4A example project mentioned as above, all the remaining works I can do. Because I've already work with sqlite data in several projects. Thank you Erel. Upvote 0
First of all I'm sorry for my bad English. I can not connect mysql database with b4a project, my database is hosted in https://www.gsddemoz.com , database name is gsddemoz_sp Now, I need an example project with following requirements. 1. Connection with remote MySql database hosted in https://www.gsddemoz.com a. database name = gsddemoz_sp b. table name = userlist 2. I want to bind all users (username is column name) in ListView. 3. I want to add a new username in userlist table. If I get the B4A example project mentioned as above, all the remaining works I can do. Because I've already work with sqlite data in several projects. Thank you Erel.
aeric Expert Licensed User Longtime User May 18, 2020 #4 I think we can develop in local first then only migrate to production. Upvote 0
DonManfred Expert Licensed User Longtime User May 18, 2020 #5 gpbimal said: I can not connect mysql database with b4a project, my database is hosted in https://www.gsddemoz.com , database name is gsddemoz_sp Click to expand... Does the provider allow access to the DB from outside? Upvote 0
gpbimal said: I can not connect mysql database with b4a project, my database is hosted in https://www.gsddemoz.com , database name is gsddemoz_sp Click to expand... Does the provider allow access to the DB from outside?
gpbimal Member May 18, 2020 #6 DonManfred said: Does the provider allow access to the DB from outside? Click to expand... Yes, other standalone (desktop version) software are used to entry data into the database. I've configured the remote access as well. Upvote 0
DonManfred said: Does the provider allow access to the DB from outside? Click to expand... Yes, other standalone (desktop version) software are used to entry data into the database. I've configured the remote access as well.
gpbimal Member May 18, 2020 #7 aeric said: I think we can develop in local first then only migrate to production. Click to expand... Oh! you mean we have to write code for localhost at first? But I'm sorry to say I cannot connect with localhost also. Upvote 0
aeric said: I think we can develop in local first then only migrate to production. Click to expand... Oh! you mean we have to write code for localhost at first? But I'm sorry to say I cannot connect with localhost also.
aeric Expert Licensed User Longtime User May 18, 2020 #8 For anyone here to help you further, you need to provide more info like error log or post the code that you think cause the issue. I recommend you follow the tutorial again and then ask which part you don't understand. You may also use the search function to search the question which already been asked by someone else. You may find the questions already solved. Upvote 0
For anyone here to help you further, you need to provide more info like error log or post the code that you think cause the issue. I recommend you follow the tutorial again and then ask which part you don't understand. You may also use the search function to search the question which already been asked by someone else. You may find the questions already solved.
Bladimir Silva Toro Active Member Licensed User Longtime User May 18, 2020 #9 Hi @gpbimal There are 3 ways to connect to a database from B4A: 1. jRDC: it is a middleware that runs in JAVA, for this you need your own web server or a VPS web service. Look here: https://www.webhostnepal.com/cloud-vps 2. WebService: You can create your own web service either in PHP, ASP, JSP, you must share the information with a JSON. You only need a Web Hosting. Look here: https://www.webhostnepal.com/hosting 3. Direct JdbcSQL connection: For this you only need a web server and that your database supports remote connections. You only need a Web Hosting. Look here: https://www.webhostnepal.com/hosting Choose the way you want, all the information can be found in the forums. Upvote 0
Hi @gpbimal There are 3 ways to connect to a database from B4A: 1. jRDC: it is a middleware that runs in JAVA, for this you need your own web server or a VPS web service. Look here: https://www.webhostnepal.com/cloud-vps 2. WebService: You can create your own web service either in PHP, ASP, JSP, you must share the information with a JSON. You only need a Web Hosting. Look here: https://www.webhostnepal.com/hosting 3. Direct JdbcSQL connection: For this you only need a web server and that your database supports remote connections. You only need a Web Hosting. Look here: https://www.webhostnepal.com/hosting Choose the way you want, all the information can be found in the forums.
gpbimal Member May 22, 2020 #10 Hi expert team! I'm feeling that I reached very near of solving the JRDC issue. I can not find my mistake, please help Upvote 0
Hi expert team! I'm feeling that I reached very near of solving the JRDC issue. I can not find my mistake, please help
aeric Expert Licensed User Longtime User May 22, 2020 #11 Are you using default port 3306 for mysql ? Upvote 0
josejad Expert Licensed User Longtime User May 22, 2020 #12 It seems you have test your jRDC2 connection from the same computer running the server. Have you tried to access 192.168.10.10:17178/test from another computer, or from the the android browser? Maybe a firewall problem. Upvote 0
It seems you have test your jRDC2 connection from the same computer running the server. Have you tried to access 192.168.10.10:17178/test from another computer, or from the the android browser? Maybe a firewall problem.
gpbimal Member May 22, 2020 #13 aeric said: Are you using default port 3306 for mysql ? Click to expand... Yes my xampp is running on port 3306. Attachments 3306.png 34.8 KB · Views: 557 Upvote 0
aeric said: Are you using default port 3306 for mysql ? Click to expand... Yes my xampp is running on port 3306.
gpbimal Member May 22, 2020 #14 José J. Aguilar said: It seems you have test your jRDC2 connection from the same computer running the server. View attachment 94526 Have you tried to access 192.168.10.10:17178/test from another computer, or from the the android browser? Maybe a firewall problem. Click to expand... Yes I have try from my android browser. It show connected message (same as desktop browser.) But not shown the data in the B4A listview. Upvote 0
José J. Aguilar said: It seems you have test your jRDC2 connection from the same computer running the server. View attachment 94526 Have you tried to access 192.168.10.10:17178/test from another computer, or from the the android browser? Maybe a firewall problem. Click to expand... Yes I have try from my android browser. It show connected message (same as desktop browser.) But not shown the data in the B4A listview.
josejad Expert Licensed User Longtime User May 22, 2020 #15 Do you get any connection in the B4J Log? If you don't see it, your B4A app is not reaching your jRDC2 server Upvote 0
Do you get any connection in the B4J Log? If you don't see it, your B4A app is not reaching your jRDC2 server
aeric Expert Licensed User Longtime User May 22, 2020 #16 Do you change AppStart in B4J server app? B4X: srvr.AddHandler("/rdc", "RDCHandler", False) Upvote 0
KMatle Expert Licensed User Longtime User May 22, 2020 #17 Open port 80 & 3306 in your pc's firewall and check if MySQL accepts connections from other than localhost (> "any host") Upvote 0
Open port 80 & 3306 in your pc's firewall and check if MySQL accepts connections from other than localhost (> "any host")
gpbimal Member May 22, 2020 #18 aeric said: Do you change AppStart in B4J server app? B4X: srvr.AddHandler("/rdc", "RDCHandler", False) Click to expand... Dear Aeric, yes it was already configured in the source in which i downloaded. Sub AppStart (Args() As String) srvr.Initialize("") rdcConnector1.Initialize srvr.Port = rdcConnector1.serverPort srvr.AddHandler("/test", "TestHandler", False) srvr.AddHandler("/rdc", "RDCHandler", False) srvr.Start Log($"jRDC is running (version = $1.2{VERSION})"$) StartMessageLoop End Sub Upvote 0
aeric said: Do you change AppStart in B4J server app? B4X: srvr.AddHandler("/rdc", "RDCHandler", False) Click to expand... Dear Aeric, yes it was already configured in the source in which i downloaded. Sub AppStart (Args() As String) srvr.Initialize("") rdcConnector1.Initialize srvr.Port = rdcConnector1.serverPort srvr.AddHandler("/test", "TestHandler", False) srvr.AddHandler("/rdc", "RDCHandler", False) srvr.Start Log($"jRDC is running (version = $1.2{VERSION})"$) StartMessageLoop End Sub
gpbimal Member May 22, 2020 #19 José J. Aguilar said: Do you get any connection in the B4J Log? If you don't see it, your B4A app is not reaching your jRDC2 server Click to expand... Yes, It shows JRDC is running as shown in the picture below. But I'm not sure that B4J is connected with database or not. Will you please tell me how to check it? Thank you. Attachments 1590144647832.png 27.7 KB · Views: 528 1590146076669.png 42 KB · Views: 576 Last edited: May 22, 2020 Upvote 0
José J. Aguilar said: Do you get any connection in the B4J Log? If you don't see it, your B4A app is not reaching your jRDC2 server Click to expand... Yes, It shows JRDC is running as shown in the picture below. But I'm not sure that B4J is connected with database or not. Will you please tell me how to check it? Thank you.
OliverA Expert Licensed User Longtime User May 22, 2020 #20 In post#10, you (@gpbimal ) show the log from the B4A app. You also show the log from the B4J server. Something is not correct right there. Your jRDC2 server log should have had a log entry for the exceptions also. Just for fun, instead of Code: Dim cmd As DBCommand = CreateCommand("select_users", Null) Try Code: Dim cmd As DBCommand = CreateCommand("select_users", Array()) Why? In my notes of my modified jRDC2 server I have that a Null pointer exception can occur when cmd.Parameters is set to Null Note: Please start posting code and logs as text. Easier to copy paste than have to look at a picture and type out Upvote 0
In post#10, you (@gpbimal ) show the log from the B4A app. You also show the log from the B4J server. Something is not correct right there. Your jRDC2 server log should have had a log entry for the exceptions also. Just for fun, instead of Code: Dim cmd As DBCommand = CreateCommand("select_users", Null) Try Code: Dim cmd As DBCommand = CreateCommand("select_users", Array()) Why? In my notes of my modified jRDC2 server I have that a Null pointer exception can occur when cmd.Parameters is set to Null Note: Please start posting code and logs as text. Easier to copy paste than have to look at a picture and type out