Jump to content

Lainkes

Members
  • Content Count

    71
  • Joined

  • Last visited

Everything posted by Lainkes

  1. Lainkes

    Retrieve count values on different columns

    I'm using MariaDB. I have 1 table. In that table are 50 fields (string) that can be True or False. I want a count of the True value for every field for a particular year. I thought that SUM was adding values, not counting. Am I correct? Thanks for your feedback Lainkes
  2. Lainkes

    Editmask with variable

    Hello, I have an inputmask (maskedit component). A part of the mask is the curreny year. So now users need to type the year. Is there a way to put the current year already in the mask? Thanks Lainkes
  3. Lainkes

    Change behaviour of DateTimePicker

    Hello, If the users want to change from date to month and year, they need to use the arrow keys. Would it be possible that the change goed automatically? When a user puts in a date, that the focus goes automatically to the month. And when entering the month, that the focus goes to the year part. Thanks for your feedback Lainkes
  4. Lainkes

    Take image and sent it via email

    Hello, I'm new to FMX programming. I want to create a simple android app. I need to give in a name, a number, take a picture and sent it to a specific e-mail address. How can I access the camera and take that picture? That will be the first step. After that the question will be how to sent it all to an e-mail address. Thanks for guiding me Lainkes
  5. Lainkes

    Take image and sent it via email

    Thanks for the info. Maybe stupid question, but how can I test the app without having a smartphone (android) connected to my computer?
  6. Hello, I have several DateTimePicker components. At the start, I set these to an empty value. When I click on one of these components, I want to execute the following code : TDateTimePicker(Sender).Format := Formatsettings.ShortDateFormat; If this is executed, the selected date is displayed. If not, it seems to stay empty. I wrote a little procedure, with this code. How can I like this to every component. I tried to link it to the 'onChange' event, but it's not listed. Thanks for your advice. Greetings Lainkes
  7. I have a checkbox, a some other components on a line. Those components are disabled at the start. This is repeated several times. If a user clicks a checkbox (enabled), some components on the same line are enabled and my code is executed. Then a date can be selected and can be saved to the database. If a user clicks a checkbox (disabled), some components on the same line are disabled and the value of the DateTimePicker is set to an empty value . At the start of the program, the DateTimePicker components are empty, so no values are written to the databasse when no checkbox are enabled. Maybe there is a better solution for this problem. Greetings Lainkes
  8. Lainkes

    Write image to database

    Good morning, I read the information from an ID card into my form. I have all the info, and also a TImage component with the picture. Now I want to save the content of this TImage component to my database (mysql - firedac - blob field). What is the best way to do this? And how can I read the blob field, so that the image can be displayed again in another form? Many thanks Lainkes
  9. Lainkes

    Write image to database

    This works fine. Many thanks. Sometimes I wonder where you guys find all this information.
  10. Lainkes

    Write image to database

    Hello, I'm taking this up again. I was wondering what I need to use in FireDac to replace the TADOBlobStream command. For this code : StmPhoto := TADOBlobStream.Create(Q.Query.FieldByName('Photo') as TBlobField, bmRead); I'm still trying to read the image from my Blob field in to my TImage component. Thanks
  11. Lainkes

    DBRadiobutton

    Hello, I want to make a GroupBox component, and there I need DBCheckboxes. But I want that the user can select only checkbox. In general I want to copy the checkbox behaviour, since there is no DBRadiobutton component. I use this for reporting purpose. At the end, I just count the number of True values in a field to have a statistic. With a DBRadiogroup, I get the value of the selected radiobutton. But that's not what I need. Is that possible with the standard components? Or are there some components on the net that I can use? Thanks for your answer.
  12. Lainkes

    DBRadiobutton

    If I call the form, all DBCheckbox components should be unchecked. I tried to loop through all the components, but it does not help. Maybe I did that not in a correct way.
  13. Lainkes

    DBRadiobutton

    It does not work. To be complete, the checkboxes are on a groupbox component, and these are on a pagecontrol component. I set the ActiveControl property of the form to the Save button of the form.
  14. Lainkes

    DBRadiobutton

    I have a question. When I start my program, there is always one of the DBCheckboxes that is active. How can I disable that. So that by default no value is selected. Thanks
  15. Lainkes

    Add Icon in DBGrid cell

    Hello, I have a DBGrid with records. On column contains a True of False value. Now I want this to be changed into a green icon (True) of red icon (False). And when clicking on the icon, it must be changed from T to F or F to T. Any idea how I can achieve this? Thanks Lainkes
  16. Lainkes

    DBRadiobutton

    I restarted the Delphi program, and now your first code seems to work. The selected checkbox has True, all the other fields are NULL. So that's a very good way to work. Many thanks for this solution.
  17. Lainkes

    DBRadiobutton

    Good morning. When changing the code I get an access violation error. I guess it has to do with the change of code. Any idea what is going wrong? Many thanks
  18. Hello, I have this code procedure Tfrm_langauge.Button1Click(Sender: TObject); var I: Integer; dirtystr, cleanstr : string; begin cleanstr := ''; dirtystr := '123456'; for I := 0 to dirtystr.Length - 1 do cleanstr := cleanstr + dirtystr[I]; end; For some reason, the cleanstr string is always empty. Any idea what is going wrong. I'm sure it's something stupid. The purpose is to remove all characters except numbers for a string. I check the character and if it is a number, I add it to my new string. When I tested that function, it returned always an empty string. That's why I did this little test with the above code, with the same result. Thanks for your help Lainkes
  19. Lainkes

    DBRadiobutton

    Thanks for the code. This seems to work like I wanted. The only problem is that all the fields are getting the value True when saving the record. I linked all the components to the same event. Maybe that's not the correct way to handle.
  20. Lainkes

    DBRadiobutton

    That's indeed my problem. So I guess it's not possible to create that.
  21. Lainkes

    DBRadiobutton

    Let's say I have 5 fields in my table. I want to link each of them to a DBCheckbox component (in a TGroupbox). But only one can be checked. So the behavour is Radiobuttons. So for every record in my table 4 of the 5 fields have the value False, and 1 value is True. At the end, I can do a count of the number of True values of each field. Using if statements can be a solution, but that's not clean in my opinion. I have some groups where I can chose between 20 choices.
  22. Thanks. This worked. I thought that a string was an array of characters. And an array starts at position 0.
  23. Lainkes

    Replace TCheckBox with TDBCheckBox

    Hello, I have a lot of TCheckBox components. Now I want to change them all to TDBCheckBox components. Is just changing the type in my TForm class enough? Or do I need to do more? Thanks for your feedback Lainkes
  24. Lainkes

    Replace TCheckBox with TDBCheckBox

    Thanks. This seems to work. Lainkes
  25. Lainkes

    check if string date

    Hello, I have a TEdit component. Now I need to check if the value is a date. (Date is not from user input, so I cannot use a dateTimePicker) I tried to use the TryStrToDate function but then I have an error. Error : [dcc32 Error] frm_xxx.pas(691): E2250 There is no overloaded version of 'TryStrToDate' that can be called with these arguments. Is there a better solution to achieve this? Thanks Lainkes
×