Android Question database sul server

SalentoFC

Member
Licensed User
If you can see download file ok after I insert dates ok with fillscrollview2 put the informations on display ok at the end I must upload file in the same address (sovrascrivere) and too it is ok but when for ex. I try to reopen this db (as you Exactly say) this not contains more a structure (into default external the name begin .db.back)
 

SalentoFC

Member
Licensed User
Now I'm go to sleeping.. more later hope there will be a solution for this "rompicapo".

Tks . Grazie Luca
 

LucaMs

Expert
Licensed User
Perfetto, si è incasinato il pc, devo riavviare.
Sembra che se non esegui un ftp list il file sul server non venga aggiornato (o almeno l'app non lo vede aggiornato).

Very well... I need to reboot my pc.
It seems that if you don't start an ftp list command, the server files are not updated (or the app does not show the changes)
 

LucaMs

Expert
Licensed User
DOPO MOOOLTA FATICA (sono le 6:56 !!!) ho scoperto che:

1) io non riesco ad accedere al mio server FTP se la mia pw contiene caratteri strani - tipo $, mentre con FileZilla sì;
2) non funziona nemmeno sul mio server FTP;
3) NON FUNZIONA NEMMENO USANDO FILEZILLA: il db file "ritorna" vuoto, senza struttura e, quindi, tantomeno dati:
3) deve esserci qualche problema nel salvare file di tipo db sui server; infatti, se io salvo il db in formato compresso (.zip) e poi lo scarico, la sua struttura finalmente è contenuta! (quindi diventa possibile inserire/modificare records).

Maremma hagnolina, le ho provate tutte: nome db con sole minuscole, senza sottolineature, nome semplicissimo... nada!

E' necessario comprimere e decomprimere il file di tipo SQLite.

__________________________________________________________________________________________________________
E mo me tocca pure tradurre!
__________________________________________________________________________________________________________

Translation (?!)


AFTER SOOOO MUCH EFFORT ( 6:56 AM) I discovered that:

1) I can not access my FTP server (using B4A) if my pw contains chars like "$", while FileZilla can;

2) the project does not work even on my FTP server;

3) IT DOES NOT WORK EVEN USING FileZilla: the db file "returns" empty, without structure and, therefore, without data:

3) there must be some problem saving file type db on the FTP servers; In fact, if I upload the database in a compressed format (.zip) and then download it, its structure is finally contained! (so it becomes possible to insert/edit records).

Maremma hagnolina (not easily translatable: Maremma little female dog :)) , I tried all: Lowercase names, names without special characters, names without extension... nada!

It is necessary to compress and decompress the SQLite files.
 

LucaMs

Expert
Licensed User
I have tried everything.

The file is empty (no records), before the upload and after the download, but when you download it from the server, it has no longer even the structure.

Surely the problem is not the app, because the same thing happens
using FileZilla:
I upload the db on the server (with structure and only one record), download it on the desktop and it is an empty file (2046 kb, it seems to me, when it has no records, I have tried with and without records).

This does not happen if the file is compressed (using FileZilla does not happen and does not happen using my app).
 

LucaMs

Expert
Licensed User
I've uploaded and download simpy ASCII files (.txt) without problems.

If, as I think, the problem is just the type (SQLite not accepted by the host) I think the best thing is to encrypt them; this will be also an advantage for privacy.
 

SalentoFC

Member
Licensed User
Ive thinking now to do this:
Insert dates into txt file as a single record..

1. Download txt file;
2. Read context of it and inser each single line into a db file as a single record (1 line 1 record db) on dirdefaulrexternal (That I using as a temp recipient only for fast the operations of ordering)
3. after reading, going to update txt with another line of the new user's results and both insert the last line as last record db;
4. show all on display throw viewfillscrollview2;
5. Uploading updated txt on server;
6. Delete dirdefaultexternal file txt;
7. Delete all record of db in dirdefaultexternal but no the file db (so structure of database should remaining intact and working) as a same recipient for next time.
each time must to do copy empty .db file.dirassets --> File.DirDefaultExternal

Complex but I think functionally.
What do you think about it?
 
Last edited:

SalentoFC

Member
Licensed User
Esatto. È quello che penso di fare. Già ho un file locale x le statistiche fatto in questo modo ma lì è semplice legge i valori di un solo rigo (più campi) e mostra il risultato in output.
Se riesco a fare ciò x il db magari ci impiega più tempo (xke legge dal file di testo e deve riscrivere il tutto nel db x l'ordinamento poiché è una classifica punti) ma x ora nn vedo altre soluzioni.
Ora traduco ;-)

Exactly. I think to do it above you said.I've got just a local file that do this
For statistics but it's easily to work because it read values of a single line (more fields) and put result on output.
If I'm able to do it probably the time will be more (because read a txt file and must to rewrite all lines into db for the order because it is a classific points) but now I think can be a good solution.

Sorry for my english everybody..
Roberto
 

LucaMs

Expert
Licensed User
Guarda, ho passato la notte in bianco. Me ne vado a nanna e... stanotte vedo se posso trovarti una soluzione ottimale.

Solo una cosa, confermami se lo scopo è che un utente fa il proprio gioco e deve leggere/aggiornare una classifica online.

Buona notte :p

------------------------------------------------------
Sorry, dear members, but the thread started in italian...

brief: i'll search a solution... next night :(


(if you have one right now... it is better :D)
 

SalentoFC

Member
Licensed User
Innanzitutto grazie del tempo speso x me! Il gioco è quello si.. uno finisce le vite e ottiene un punteggio che se ha la connessione può pubblicare online x sfidare gli avversari. Ora riposati dai.. e grazie ancora.

Basic tks for your precious help for me. In the game when a user ends his point if he like can be published online with Others user's points game. Now go to sleep ok.. ank tks again
 

LucaMs

Expert
Licensed User
Well, you can do it in many ways, more or less simple, more or less efficient.

Because I realized that you prefer the simplicity (rightly) the idea of the text file via FTP may be sufficient.

Of course if it were possible to send/receive that blessed SQLite file would be even easier, but using the FTP command, I still did not succeed.

As I promised, I will try in a few hours with a normal text file.

-------------

Beh, si può fare in molti modi, più o meno semplici, più o meno efficienti.
Dato che ho capito che preferisci la semplicità (giustamente) l'idea del file di testo tramite FTP può essere sufficiente.

Certo se si riuscisse ad inviare/ricevere quel benedetto file SQLite sarebbe ancora più semplice, ma tramite il comando FTP della libreria Net, ancora non ci sono riuscito.

Come promesso, tra qualche ora proverò con un normale file di testo.
 
Top