I don't know. The code is rather simple. We need more info - a project reproducing the issue, or some additional info. Are you sure it's hanging or just slow?
Var
IndiceTabla, X: Integer;
ArregloTablas: TStringList;
TablaRemota: TXDataset;
begin
ArregloTablas := TStringList.Create;
ArregloTablas.Add('Clientes');
ArregloTablas.Add('Productos');
ArregloTablas.Add('ProductosFotos');
ArregloTablas.Add('Unidades');
ArregloTablas.Add('Lineas');
ArregloTablas.Add('Empresa');
ArregloTablas.Add('Usuarios');
For IndiceTabla := 0 to ArregloTablas.Count - 1 do
Begin
// Indicamos la tabla en Operación
IndicadorProgreso.Message := 'Tabla ' + ArregloTablas[IndiceTabla];
// Clonamos tablas
TablaRemota := TXDataSet.Create(Self);
TablaRemota.Database := ModuloDeDatos.ConexionBD; <------ Here a link to a DataModule Unit
TablaRemota.SQL.Clear;
TablaRemota.SQL.Add(' Select * from ' + ArregloTablas[IndiceTabla]);
TablaRemota.Open;
// Destruimos la tabla temporal remota
TablaRemota.Close;
TablaRemota.Free;
End;
// Liberamos
ArregloTablas.Free;
Code aboves hangs on SECOND iteration, check for yourself, I mean when IndiceTabla >= 1
Again, isn't it just that table Productos is too big and taking too much time? It's not a good practice to do a raw Select * from from any database, and specially using RemoteDB.
What is the exact line that hangs?
Other than this, unfortunately we need a way to reproduce the issue at our side.
As I wrote on my first post "I'm building a remoteDB sync into my local SqLite database:"
The idea is to "send part of my database" not even the entire into my local SQLite, if your component does not support that kind of overload then it does not work for my goal.
In that case RemoteDB is a joke then, you must claim that such components only support 100 retrieved records.
I need to enable my user to be a mobile offline POS, but for that he must have the entire DB of this products and clients in his tablet or smart phone, if he manage 15000 records it's his problem not mine, I'm just giving him the solution to carry such amounts of records in order to sale products, and later upload the records to his server when arrives at the Server with some kind of Sync procedure.
I still don't know what the problem is. It can be a multitude or reasons and I can only guess.
I'm suggesting you do tests. Try to limit the number of records retrieved using SQL and see what happens. Investigation is needed.
However I've another table with images saved on Blob fields, total records in this table not exceed 83, so when I tried to select from an TXDataset it hangs too.
So I think trouble is concerning to some kind of cache on your side, or timeout, I don't design the components but your company does.
The more data you transfer, the longer it will take to receive and process. And the more memory it will take as well. But in any case, to properly know what's going on, of course we need to reproduce the issue. So far we were not aware of any similar issues with RemoteDB.
Today I tested on iOS, I increase timeout on my TADOConnection component [comandtimeout and connectiontimeout], however I don't think this could help anything.
Tested was okey without increase any other timeout property as you wrote me, so my problem is on Android specifically.