Android Question Connect to SQLite database stored on webpage

MoraviaVenus

Member
Licensed User
Longtime User
Hi,

I face a problem when I want to use SQLite database file stored on webpage to select and update data. My situation is following:
- I have SQLite database file database.db, where is one table (MyTable) with three text columns: ColA,ColB, ColC. There is no password protection in the file.
- I have webpage, let's say www.abcd.com, where is stored my SQLite database file (www.abcd.com/folder/database.db).
- I am connecting to the files in the webpage through FTP (using FTP.Initialize("FTP", "www.abcd.com", 21, "MyUserName", "MyPassword")).
- Now I want to perform select from database.db: select ColA, ColB from MyTable - the question is: how to?

I tried to use the RDC tutorial, but I don't know what to put where and how :(

I downloaded RDC files, I downloaded file sqlite-jdbc-3.7.2.jar and put it to jdbc_driver folder, I changed file config.properties:
B4X:
DriverClass=org.sqlite.JDBC
JdbcUrl=jdbc:sqlite:http://www.abcd.com/folder/database.db
User=
Password=
ServerPort=17178
Debug=true

#commands
sql.select_statement=SELECT ColA, ColB FROM MyTable

Please, how should I force my app to connect to my webpage, select data from database.db and display it inside of app?

Thank you for help.
 

MoraviaVenus

Member
Licensed User
Longtime User
Hi Erel,

do I understand it correctly, that I should copy RDC files (RunRLC.bat, config.properties, c3p0.properties) and RDC folders (jdbc_driver and libs) to webserver (destination http://www.abcd.com/folder/)?

The file RunRLC.bat on my computer contains path to java folder stored in my computer.
B4X:
"C:\Program Files (x86)\Java\jdk1.7.0_51\bin\java" -Xmx256m -cp .;libs\*;jdbc_driver\* anywheresoftware.b4a.remotedatabase.RemoteServer
pause

I suppose, java should be also on my web server, am I right? How do I put java on web server? How do I run RunRLC.bat there?

Thank you for help...
 
Upvote 0
Top