Android Question database sul server

SalentoFC

Member
Licensed User
Longtime User
Salve a tutti.
Volevo sapere come fare ad aggiornare un file .db esistente sul server. È un file di classifica per gioco. Io scarico il file con ftp.download... poi il file che ho scaricato lo popolo con i miei dati e all'atto di effettuare l'upload sul server non mi da errori ma noto dal file di log "java.net.unknownhostexception: ftp.... etc cioè non riconosce il nome del server immagino. Cosa devo fare? Sto impazzendo.. grazie a tutti!
 

SalentoFC

Member
Licensed User
Longtime User
If I try it directly on my device it's more fast. I'll put a msgbox into each sub if download, upload and inserting work and if is ok then will be only a question of emulator
 
Upvote 0

SalentoFC

Member
Licensed User
Longtime User
I just try with my phone and download work ok. But when go to insert into table1 the values its catch out a log message (I don't see it Because not with emulator but with real device --> non riesco a capire il tipo di messaggio d'errore poiché il file di log non compare sul cell).
Dear Luca I ask too much if you can try after download the insert and upload functions? (at the end i will offer you una cena di pesce --> fish ;-)
 
Upvote 0

SalentoFC

Member
Licensed User
Longtime User
I've just resolved insert routine (error relatives at number field's table).
After insert, I close cursor1 (that do a select * from .... to show the dates into a panel). Now with the .db open I must to update it and upload the file into the server but when the code try yo compile ftp.uploadfile (...) show it an error that I attach here..
I don't know what means..
Screenshot_2014-12-07-22-18-22.png
cannot parse?
I'm trying it directly on my phone with wireless b4a bridge.
How can I resolve it?
tks very much
 
Upvote 0

SalentoFC

Member
Licensed User
Longtime User
Now I was able to do all the functions but when terminate the upload command (I've inverted the path local and server in line 176) now when I go to redownload the .db and initialize sql1 compare this error
SqlLiteCantOpenDatabaseException: unknown error (code 14) could not open database

what means?
I've just notate into external path of my phone there isn't .db file but .db.back
if I rename it in .db and open with sqlite manager it's not appear more the table.
and this after upload file on server.
now I attach the final code.
 

Attachments

  • project (2).zip
    2.5 KB · Views: 315
Last edited:
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
Se non è un problema, per te, dovresti allegare il progetto completo (dal menu File -Export As Zip).
Comunque, provo a dargli un'occhiata ugualmente.

If you can, post your complete project, using File - Export As Zip.
Anyway, I'm testing it.


P.S. You can send it to me via email
 
Upvote 0

SalentoFC

Member
Licensed User
Longtime User
This is the result after insert.
Initially fole .db is this attached and has got a structure

see now at
robertodaniele.altervista.org/sMg/sMg_21hz133.db
 
Upvote 0
Top