Revisión | 19 (tree) |
---|---|
Tiempo | 2020-03-11 03:57:20 |
Autor | ![]() |
Ajustada uma regra de mapeamento do FireDAC a fim de resolver o problema que o SQLite tem com campos nulos. Toda vez que a tabela de saldos estava vazia, o saldo do mês (um campo calculado com sum) era interpretado pelo FireDAC como WideString (provavelmente porque era Null) e quando a tabela tinha ao menos um registro, o mesmo campo era interpretado como LargeInt. O mapeamento converteu WideString em LargeInt e tudo funcionou perfeitamente
Comentados todos os códigos que estavam salvando arquivos em D:\
@@ -129,7 +129,7 @@ | ||
129 | 129 | RE.Content := TStringStream.Create(''); |
130 | 130 | try |
131 | 131 | Request(RO, RE); |
132 | - TStringStream(RE.Content).SaveToFile('d:\CiCo_GetInitialCookies.txt'); | |
132 | + //TStringStream(RE.Content).SaveToFile('d:\CiCo_GetInitialCookies.txt'); | |
133 | 133 | finally |
134 | 134 | RE.Content.Free; |
135 | 135 | RO.HttpSendRequestParams.Headers.Free; |
@@ -264,7 +264,7 @@ | ||
264 | 264 | RE.Content := TStringStream.Create(''); |
265 | 265 | try |
266 | 266 | Request(RO, RE); |
267 | - TStringStream(RE.Content).SaveToFile('d:\CiCo_OpenCheckInCheckOutPage.txt'); | |
267 | + //TStringStream(RE.Content).SaveToFile('d:\CiCo_OpenCheckInCheckOutPage.txt'); | |
268 | 268 | |
269 | 269 | // Realiza um parser na resposta buscando várias informações. Se não |
270 | 270 | // houver movimentação no dia significa que o usuário não fez checkin |
@@ -372,7 +372,7 @@ | ||
372 | 372 | try |
373 | 373 | Request(RO, RE); |
374 | 374 | |
375 | - TStringStream(RE.Content).SaveToFile('d:\CiCo_ExecuteLogin.txt'); | |
375 | + //TStringStream(RE.Content).SaveToFile('d:\CiCo_ExecuteLogin.txt'); | |
376 | 376 | |
377 | 377 | HD := coHTMLDocument.Create as IHTMLDocument2; |
378 | 378 | HD.Write(TStringStream(RE.Content).DataString); |
@@ -824,7 +824,7 @@ | ||
824 | 824 | try |
825 | 825 | Request(RO, RE); |
826 | 826 | Result := ParseHoursViewPage(TStringStream(RE.Content).DataString); |
827 | - TStringStream(RE.Content).SaveToFile('d:\CiCo_Saldo' + Result.Ano.ToString + Result.Mes.ToString + '.txt'); | |
827 | + //TStringStream(RE.Content).SaveToFile('d:\CiCo_Saldo' + Result.Ano.ToString + Result.Mes.ToString + '.txt'); | |
828 | 828 | finally |
829 | 829 | RE.Content.Free; |
830 | 830 | RO.HttpSendRequestParams.Headers.Free; |
@@ -900,7 +900,7 @@ | ||
900 | 900 | try |
901 | 901 | Request(RO, RE); |
902 | 902 | Result := ParseHoursViewPage(TStringStream(RE.Content).DataString); |
903 | - TStringStream(RE.Content).SaveToFile('d:\CiCo_Saldo' + Result.Ano.ToString + Result.Mes.ToString + '.txt'); | |
903 | + //TStringStream(RE.Content).SaveToFile('d:\CiCo_Saldo' + Result.Ano.ToString + Result.Mes.ToString + '.txt'); | |
904 | 904 | finally |
905 | 905 | RE.Content.Free; |
906 | 906 | RO.HttpSendRequestParams.Headers.Free; |