Jump to content

Alberto Fornés

Members
  • Content Count

    23
  • Joined

  • Last visited

Community Reputation

3 Neutral

1 Follower

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Alberto Fornés

    Close a TIdTCPClient connection

    Thanks Remy, your words are greatly appreciated on this topic. That's right, the host only accepts one connection, and the message is sent by it. I will find a way to close the connection (maybe restart the device) so that I can connect again.
  2. Alberto Fornés

    Close a TIdTCPClient connection

    Hello, I have created a thread where there is a TIdTCPClient component that receives readings from a barcode reader connected through an ethernet base. The goal is for you to be in a connected service all day without stopping. The thread works, I can start and stop it several times, when I stop the thread I execute these steps to close the connection (FClient = TIdTCPClient): FClient.IOHandler.InputBuffer.Clear; FClient.IOHandler.CloseGracefully; FClient.Disconnect; FClient.Socket.Close; I don't know if they are all necessary, but I have tried to get the desired result. To test, I need to achieve a reconnection when a network failure is detected (for this I disconnect the cable from the pc), when I detect an error in the reading: try FData: = FClient.IOHandler.ReadLn; except on E: Exception do begin FClient.IOHandler.InputBuffer.Clear; FClient.IOHandler.CloseGracefully; FClient.Disconnect; FClient.Socket.Close; // Terminate thread end; In this second case, when I try to connect again, I get this message from the base: This channel is already in use, no slot is available. It seems that the old host-port socket remains active: how can I ensure that it is closed?
  3. Alberto Fornés

    Install recent Delphi versions on Windows XP

    Hello, sorry for delay to respond, I was talking about executables generated with Delphi 10.3, not about installing Delphi 10.3 in a XP computer. I'm able to run the programs, except the problem with themes in some contros, as datatimepicker so I need to disable theme for that controls.
  4. Alberto Fornés

    Speed of Graphics32

    Years ago I was testing various possibilities to display points, lines, polygons, etc. on a map, with various libraries and OpenGL was the one who did it the fastest, perhaps showing text found worse performance.
  5. Alberto Fornés

    Speed of Graphics32

    I think OpenGL can be a good option for this.
  6. Alberto Fornés

    Firedac - Sqlite - DateTime field

    You are right (maybe you know something about FireDac 😀), previously I used this format to insert values: UPDATE FICHADAS SET HASTA = ' + QuotedStr(FormatDateTime('dd-mm-yyyy HH:nn',FDMemTbCSV.FieldByName('Fecha').AsDateTime)) Now it works with this (using DateTimeFormat driver parameter to DateTime): 'UPDATE FICHADAS SET HASTA = ' + QuotedStr(FormatDateTime('yyyy-mm-dd HH:nn',FDMemTbCSV.FieldByName('Fecha').AsDateTime)) what made me doubt was seeing that with SQLiteStudio 3.2.1 it was possible to see the data (there was no error in the update, I imagine because it is finally a double). Thank you.
  7. Alberto Fornés

    Firedac - Sqlite - DateTime field

    Hello Dmitry, thanks for your response, but changing DateTimeFormat driver parameter to Binary or DateTime the grid don't show me this two datetime fields data, also I tried this select: SELECT FICHADAS.IDFICHADA,FICHADAS.IDEMPLEADO,FICHADAS.DESDE AS "FDESDE::DATETIME",FICHADAS.HASTA AS "FHASTA::DATETIME" , but get the same behaivor.
  8. Alberto Fornés

    Firedac - Sqlite - DateTime field

    I have created a table with firedac using sqlite as database, using this script: CREATE TABLE FICHADAS (IDFICHADA INTEGER PRIMARY KEY AUTOINCREMENT,IDJORNADA INTEGER,IDEMPLEADO INTEGER,DESDE DATETIME ,HASTA DATETIME ,MINORMAL SMALLINT,MINEXTRA SMALLINT) Therefore I define the DESDE and HASTA fields as datetime, I can insert into the table as datetime fields and when I put a TFDTable component bound to the table it recognizes the fields as TDateTimeField, but when I try to visualize it in a TDBGrid it does not show anything in those two fields and nothing appears if I run the select on the connection editor: but using SQLiteStudio 3.2.1 , I can see the data: I guess I need to configure something in Firedac to work with these fields, but I can't know what, any suggestions? Thanks.
  9. Hello, which tool do you use to do this enumeration?, thanks.
  10. Alberto Fornés

    Your RAD Studio 10.4 Sydney issues

    Also I see that "in order to proceed", and in Project --> Options a label 'Panel1' is displayed until you click the left menú.
  11. Alberto Fornés

    Install recent Delphi versions on Windows XP

    I have installs with Delphi 10.3.3 on Windows XP, some problems with vcl themes (datatime picker don't work), so I don't use it with that SO, but it works.
  12. Alberto Fornés

    JFF: FMX + FR + HTML

    Ok, thanks. As your library is good rendering HTML, I suggest the posibility to render widgets within a report, maybe not only complete HTML documents , so also div sections, tables or parts of html. Something like include a widget that point to a server url that return only a <table></table> code and render it, adapting dimensions within report.
  13. Alberto Fornés

    JFF: FMX + FR + HTML

    I imagine that this feature improves the basic HTML rendering within fastreport, it can be used with dynamic HTML content?, I mean HTML generated from a server as svg graphics or content with variable dimensions?
  14. Hello, I am in the process of organizing how I save information from a estimate - orders system . Normally one thought of a master table (customer, total quantities, discount, taxes, etc.), and one or two detail tables with the items that make up the order (code, quantity, price, discounts, etc). In this case the information that makes up the detail is quite complex, and depends on many variables and it is possible that it is frequently reviewed. That's why I was thinking instead of defining a table with a multitude of fields, saving all the information in a json document. My question would be what experiences or inconveniences can you share and recommend about it. In my case, the database is Firebird and I would save the information in a blob field, I know there are other databases better prepared to handle JSON fields, but it is a change that if I can, I prefer not to do it. I imagine that the topic of the querys will be a weak point of working with json, but maybe I can solve it with support tables with certain indexed fields.
  15. Alberto Fornés

    [Firedac] Connection Pooling

    Well and the end I call this method FDManager.Open; I think do the same (not sure). Anyway after trying a lot of changes, I can do the job creating the connection by code and assigning the connection definition before connect: Connect:= TFDConnection.Create(nil); Connect.Params.DriverID:= driverDB; Connect.ConnectionDefName:= defConn; also I've changed how to set the username and password: //before I use this: Connect.Params.Values['Database']:= TServerConfig.DataPath('DB') + TServerConfig.DBName; Connect.Params.Values['Password']:= PwdFirebird; Connect.Params.Values['UserName']:= UserDB; //and change to this: Connect.Params.Database:= TServerConfig.DataPath('DB') + TServerConfig.DBName; Connect.Params.Password:= PwdFirebird; Connect.Params.UserName:= UserDB; With this changes it works.
×