Jump to content

Alberto Fornés

Members
  • Content Count

    47
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Alberto Fornés


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


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


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


  4. 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ú.


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


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


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


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


  9. 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¡


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

     


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


  12. I make a simply use of this library an TTask, and I don't see any problem with it (for sure not full tested), but reading your point "The first task takes forever to start (over a second)" , I would like to know if somebody else can confirm this, because I experimented delays at start, but it did not relate to TTask, because they are tasks that connect to remote servers and I thought that was the problem, but if the TTask start takes a second, it is possible that there is a problem with TTask. I would like to know if in this sense it can be a better to use other alternative like OmniThreadLibrary.

     

    Have a good year¡


  13. I do not know about the MARS Curiosity library, and for the tests that I have done the Delphi MVC Framework of Daniele Teti ( https://github.com/danieleteti/delphimvcframework ) can also serve as backend, and serve the html pages of the application. As a system to style the web pages a good option is  https://www.w3schools.com/w3css/, it is small and it will give a modern and responsible aspect for both pc and mobile. You can represent the graphs through the D3 library ( https://github.com/d3/d3 ) that can be fed with json data generated by the MVC Framework backend. As a way to notify changes to the VCL application, you could define events in the database (when you insert, modify or delete a record in a table) and capture them with the TFDEventAlerter (Firedac) component. Other forms would be using websockets.   
     Another library for backend that seems good option and apparently has a good performance is MorMot ( https://synopse.info/fossil/wiki/Synopse+OpenSource ), but I think that for 5 users, MVC Framework may be enough and is more easy to learn (at least for me). 


  14. 1 hour ago, Fred Ahrens said:

    We had the same problem with very slow opening of forms.

    At the end we tracked it down to a problem with LiveBindings. Disabling LiveBindings (removing the related component packages in the IDE) accelerated the opening of forms dramatically. That's of course a solution only for projects where you don't rely on LiveBindings.

      I can confirm this, the project was so big that was impossible to open with LiveBindings packages installed, so I removed it, and it worked. I would like to know why a project that did not use Livebindings (Delphi 7) is affected in this way.

    • Like 1
×