Jump to content

Alberto Fornés

Members
  • Content Count

    57
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by Alberto Fornés


  1. Maybe if you don't have the human resources and / or time to do a good test and find bugs before releasing the product, and you hope that the customers will find and report them, maybe Embarcadero could offer that version at a lower price and establish a more honest relationship.

    • Like 3

  2. Finally I found how to solve the problem on the computer that was failing (only 24 days have passed!). Unchecking this option (in beta) from the regional settings. Does anyone know how the system identifies that a program is unicode or not? 

     

     

    check_utf8_beta_3.png


  3. 8 hours ago, Kas Ob. said:

    Don't have an answer, but some thoughts here

     

    1) You control these two devices, so why not log the problem input then compare, just log i,c and bd , this should give you a great insight.

    2) Where did the data come from ? is it same DB or by mistake you have two different DB, compare the source.

    3) "bd value is not the same in Delphi 10.3 as in Delphi 10.4" is not enough, does bd have meaningful data or something unreadable ? are bd value is from different fields ?

     

    Hope that helps.

     

     Hello Kas Ob, thanks for you reply. As I said in second message the problem is not related to Delphi version, is related to computer where I execute the program. The DB is the same, I attach a small demo with the esential part of code where I can verify the error. When I open the program a TFDMemTable with different fields defined is open, I add a record with some values and use the add image button to load a blob field (in this case bitmap image included in sample code, that you can see on picture) :

     

    create_table.thumb.png.c3759d8bc686b15e7d3df47807d20af0.png

     

     When Save Table button is pushed the data and some table metadata is used to fill a stream that can be saved in a file, although you can use de load table button to fill a second TFDMemTable with this stream, and assign the dataource to this dataset, in this case and in a certain computer the image is not readed correctly (in other blob cases this is an error):

     

    load_table.thumb.png.551b33e5fed7ab2f54a29e2da0119a06.png

     

     If you want to load the stream from saved file, push load stream button and then load table). The same program in other computer (it doesn't matter Delphi 10.3 or Delphi 10.4) works well, so I think it's a pc configuration that I can't guess.

     

    Stream_Sample_2.zip


  4.     I expand the information, doing more tests I have verified that it is not a problem associated with Delphi 10.3 vs Delphi 10.4, I made that statement because I have two computers, one with Delphi Rio and the other with Delphi Sydney, but installing Delphi 10.3 on the other computer I have verified that the problem is due to the computer (Windows 10 in both cases). Any suggestions on any pc configuration that might motivate this? 


  5.      Hello, in a data exchange between vcl clients and a REST server, I have implemented a method to save the data in a stream, that stream I send to the client and it loads the data in a reverse process. I do this to reduce the information to be sent as much as possible and I do not directly use a SaveToStream of the table, query or stored procedure. The information of the fields I read from the IFDDataSetReference interface, and I have a problem when saving the blob fields, the procedure worked with Delphi 10.3 but with Delphi 10.4 there is something different that I cannot guess (I have a professional version and I do not have access to the FireDac code ) . The abbreviated code for the procedure is: 

     

    //iData = IFDDataSetReference
    //FieldData = array of Fields
    ab: TArray<Byte>;
    bd: AnsiString;
    nl: Int64;
    
    var ADest:= TMemoryStream.Create;
    var wr:= TBinaryWriter.Create(ADest,TEncoding.UTF8,false);
     for i:= 0 to iData.DataView.Rows.Count - 1 do
      begin
       for c:= Low(FieldData) to High(FieldData) do
        begin
         //when blob field I do this
          begin
           //ValueI is a variant
           bd:= iData.DataView.Rows[i].ValueI[c]; //bd value is not the same in Delphi 10.3 as in Delphi 10.4
           ab:= TEncoding.ANSI.GetBytes(bd);
           nl:= Length(ab);
           wr.Write(nl);
           wr.Write(ab);
          end;
        end;  
      end;

     

    In client side I can read de stream with:

     

    ADest: TFDMemTable;
    
    nl:= sR.ReadInt64;
    if (nl = 0) then
     begin
      ADest.Fields[c].AsBytes:= nil;
     end else
     begin
      ADest.Fields[c].AsBytes:= sR.ReadBytes(nl);
     end; 

     


  6. 12 hours ago, Remy Lebeau said:

    No, they are not.  All you really need is Disconnect(), or at least Socket.Close() if closing the socket from another thread.

    That is not an Indy error message, or any OS error message I have ever seen.  So I am assuming you mean it is coming from the Barcoder Reader or Ethernet base (what is that supposed to be?) instead.  Does the reader/base only allow 1 connection at a time?  If you just yank out the network cable, it won't matter what you do on the client side, the connection will be lost on the server side and it will need time to process that loss, which may take awhile, depending on the server's implementation.

    Disconnect()/Close() will perform a graceful disconnect (send a FIN packet to notify the peer that the connection is being closed intentionally).  That should allow the reader/base to free up the used slot immediately.

     

    However, it won't matter what you do in the case of the connection being lost abnormally, like from a network outage.  All you can do in that case is wait for the reader/base to handle the loss on its end in its own time to make the slot available again.

     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.


  7.          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?


  8. On 1/28/2021 at 10:27 PM, Darian Miller said:

     

    On a diversionary whim, I tried installing 10.4 on XP and the installer presented a fatal error "This program does not support the version of Windows your computer is running."  I imagine you have to unpack, tweak the installer package, and then rebuild it to get it to work on XP, correct?

     

    On 3/11/2021 at 8:41 AM, dummzeuch said:

    I know that XE3 works fine on Windows XP.

     

    I started this topic to find out which was the last version that did. (Which does not mean that it's officially supported. So the documentation doesn't mean much unless it states a technical reason.)

     

    I'm still not sure that 10.2 doesn't work at all, it might still be an installation issue. Since the web page URL contains the word "tamper" it could be that it "detected" something in the installation it didn't like. The web page, that does not (no longer?) exist, might have contained information on the specific issue (but probably didn't).

     

    On the other hand ...

    ... that would mean a definite no.

     

    But then, there is:

     

      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.


  9. 9 hours ago, Anders Melander said:

    Why do you think that?

    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.


  10. 1 hour ago, Dmitry Arefiev said:

    Most right way will be to create an issue at quality.embarcadero.com. And attach the DB file with the words explaining what you did.

    I would expect, dates were inserted using format not supported by FireDAC.

      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.


  11.     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.


  12. 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:

     

    sqlitedatetime.thumb.png.f69229d8032dc3ce3b9d2adfde39756b.png

     

     but using SQLiteStudio 3.2.1 , I can see the data:

     

    tabla_fichadas.thumb.png.4c309d4f822717c731facb1e297ec26a.png

     

     I guess I need to configure something in Firedac to work with these fields, but I can't know what, any suggestions? Thanks.


  13. 9 hours ago, Dany Marmur said:

    Sydney is to me like the incredible mr. Ripley in that first appearances was very good. Very. After some actual real-world use, it's starting to act up and i, unfortunately, feel at home again in that i recognize the problems.

     

    This one is new to me though:

     

    image.thumb.png.9a534535340cd57076d62672e68a3d15.png

     

    Before... what? Debugging. This happened while tracing along Win32 Debug.

     

    I have no idea how to reproduce or report this.

     

    Edit: Ripley?

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


  14. On 2/17/2020 at 8:35 PM, Alexander Sviridenkov said:

    You can use SVG images defined via href, standard FR DB fields (as shown in video) which may contains HTML too, or load complete HTML using http or other protocol,  but last one requires overriding one component method.

    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.


  15.       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.


  16. 18 hours ago, Uwe Raabe said:

    Perhaps you are missing this line after the call to AddConnectionDef?

    
    FDManager.Active := true;

     

     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.


  17. Hi, I'm trying to establish a connection to Firebird, using the connection pool. In my project I have several datamodules, which I create and destroy continuously. The first datamodule that is created reads the connection configuration, connects (this does it well) and then saves the parameters of this connection in the connection definition (I use the folowing code):
     Connect is a TFDConnection component

        var oDef: IFDStanConnectionDef: = FDManager.ConnectionDefs.AddConnectionDef;     
        oDef.Name:= defConn;     
        oDef.Params.Pooled: = true;     
        oDef.Params.DriverID: = 'FB';     
        oDef.Params.Database: = Connect.Params.Values ['Database'];     
        oDef.Params.Password: = Connect.Params.Values ['Password'];     
        oDef.Params.UserName: = Connect.Params.Values ['UserName'];     
        oDef.Params.Values ['ExtendedMetadata']: = 'true';     
        oDef.Params.Values ['CharacterSet']: = 'UTF8';


    Then, when I open other datamodules, the first thing I do is assign the definition of the connection, and then I connect, but this gives an error it seems that it does not assign the user and password correctly:
     

    Connect is the TFDConnection component of the new created datamodule  
    
    Connect.ConnectionDefName: = defConn; 
    Connect.Connected: = true; (this gives connection error)


    Any suggestions of things to review and / or change?, thanks

    Note: The datamodule where I set the connection parameters and establish the connection definition, is also destroyed after read and apply this settings.


  18. On ‎8‎/‎15‎/‎2019 at 9:21 AM, Markus Kinzler said:

    The original GetIT-Server should be back.

     

    I just tested it in 10.2.3 and 10.3.2 (with temporary and standard ServiceUrl), works all.

    10.3.2_std_20190815.png

    10.2.3_20190815.png

    10.3.1_20190815.png

     I'm working with 10.2.3 , try to install Ribbon package with original GetIt server and return error during install (internal check error). 

     

     Note: today 16/08/2019 I can install the Ribbon packege, ¡it worked¡


  19. I asked this question this afternoon in a Embarcadero Webminar and received this answer

    Quote

    XP isn't officially supported with Rio because some components take advantage of APIs that are not supported on XP. If you don't use these components or libraries then you can still target XP, but your milage may varry. So if you just take an existing program and compile it with Rio it should still work on XP, but if you add some new Windows 10 components without checking OS version then you will run into trouble.

     


  20. 14 hours ago, Silver Black said:

    I'm speaking about Delphi 10.3 Rio. Some other smaller projects run too, but I had problem with one my biggest with that entry point, fixed with the "delayed" directive. Odd, because the other smaller projects (that didn't need the fix) had the Windows unit referred too.

    I knew you need to compile the project with Delphi 10.3, I just wanted to point out that with the previous version it seems to work. The truth is that it is a problem, although support for Microsoft has been withdrawn for years, there are still many customers with XP computers.

×