procedure Form1_Button1_OnClick (Sender: TObject; var Cancel: boolean);
begin
Form1.LeftButton.Click;
Form1.RightButton.Click;
// It's the same for all buttons
// When you click button 1 all those buttons will click too.
// Derek can give you a downloadable example. Greetings
end;
26 2021-02-24 17:11:59
Re: DBFile1.LeftButton.Click (7 replies, posted in Script)
27 2021-02-24 15:10:19
Re: ¿Timer object implementation or script solution? (2 replies, posted in General)
thanks brother, exact solution for what I need.
Wen.
28 2021-02-23 19:56:19
Topic: How to handle unique data in the button's new record action. (1 replies, posted in General)
Hello again, is there a way to do this?
1- I want to cancel the insertion of a data to the database if it already exists (eg the identification number of the person, ID), that is, when I click on a save button if the data exists, I get a message and do not insert this data because it is repeated.
I am using 6.5 version
29 2021-02-22 13:41:49
Re: ¿REG EX? (9 replies, posted in Script)
Hi, any suggestion from the community?
30 2021-02-22 13:40:47
Topic: ¿Timer object implementation or script solution? (2 replies, posted in General)
Hi everyone, How could I make a form refresh certain data every x seconds? The situation is the following. I have a dashboard (frm_dashboard) where I show important data and graphs, but I don't know how to refresh it automatically. This could be done with a time object but there is not one here, how could it be implemented through code?
THANKS, WEN
31 2021-02-13 16:19:36
Topic: ¿REG EX? (9 replies, posted in Script)
Hello community, I would like to validate some data (Email, DNI, date format) before saving them in the database. For this, do you know regular expressions but do not know how to use them, could you put some examples?
32 2021-02-10 03:39:45
Re: Date of bird (Calculate field) (7 replies, posted in Script)
Master, any idea why MVD 'now' returns a date and my computer gives me another?
33 2021-02-09 23:34:10
Re: Version 6.5 (30 replies, posted in General)
Hi folks, I'm getting this error when I try to remove the "bold" property from the button. Any idea of the problem?
Error: Invalid variant operation
frm1.button1.font.style := frm1.button1.font.style - [fsBold]
34 2021-02-09 19:38:25
Re: Date of bird (Calculate field) (7 replies, posted in Script)
Hello brother, a question out of the situation. How can I use calculated fields in the "SQL Query" action of the buttons? for example in a selection of data. I get the error that the field has not been selected.
35 2021-02-09 18:15:18
Re: Date of bird (Calculate field) (7 replies, posted in Script)
And if I want to obtain in a grid the list of people who have their birthday this month, how do I do it?
36 2021-02-09 03:53:11
Re: Date of bird (Calculate field) (7 replies, posted in Script)
Thanks your brother, you are amazing
37 2021-02-08 18:55:48
Topic: Date of bird (Calculate field) (7 replies, posted in Script)
Hello, I want to put in a calculated field the date of birth of the people from the ID, this is what I put, the query is supposedly fine but inside MDV it gives me an error. There is something I'm doing wrong and I don't know what it is. I need help with this my people, TKS
select format (convert(datetime, Left(dni,6),11),'yyyy/MM/dd') from dat_person
38 2021-01-28 03:46:43
Topic: SQL statement on a calculated field (1 replies, posted in SQL queries)
I have a SQL statement on a calculated field that has a CASE of SELECT and I just can't get it right. Let me explain better, I have a list of services that have a date range (start and end) I have a calculated field that if the current date is greater than the end date of the service then it takes the value (text) of "finished", if is less then it takes the value of "In progress". Could you help me with an example?
39 2020-05-27 19:23:51
Re: Question on Search with filter!!!!! (5 replies, posted in General)
A person goes through multiple courses (years) at their school (eg 1st year, 2nd year, etc.), and in each course they receive multiple subjects. What I want is that depending on the course in which the person is, the subjects they received in that course appear on the grid.
Greetings, wenchester
40 2020-05-24 04:58:33
Re: Question on Search with filter!!!!! (5 replies, posted in General)
Hi Derek, thanks first of all.
What I want to do is a little more complicated (I attach an example with a note in the form). There are 2 tables (people, subject) that have reference to another table (course). What I'm looking for is that in the grid of the people form, only the records associated with the course in question appear, and not all
41 2020-05-23 20:58:18
Topic: Question on Search with filter!!!!! (5 replies, posted in General)
Hi.
I would like to know if what I indicate in the image can be done?
The goal is for the grid content to change as the Combobox changes
42 2019-10-29 17:52:32
Topic: Objects in the form (size of the window) (1 replies, posted in General)
Hello everyone.
Any idea how to make the objects in the form have a relative position depending on the size of the window.
43 2018-09-25 15:46:16
Re: Condition "IF" with SQL Query (5 replies, posted in Script)
Just attach your project, I'll test it.
When you try it you will see that it gives an error when saving the user, but that is not the error of which I speak, if you see that it can be, correct this new error
44 2018-09-25 14:45:18
Re: Condition "IF" with SQL Query (5 replies, posted in Script)
It should works. But I see some strange keyword "elseCndition"
Please attach your project, I will test it.
Those strange words that you see are a mistake, I'm going to remove them from the original post so there's no doubt.
45 2018-09-25 13:51:04
Re: FORM (3 replies, posted in General)
Hello manix 2013
I do not know if it is what you are looking for but I leave you a little help that can help you. If what you are looking for is something else, comment and we help you ...
Regards Wen.
46 2018-09-24 17:35:52
Topic: Condition "IF" with SQL Query (5 replies, posted in Script)
In the action of clicking the "frmAddUser_btn_save" button, I declare some variables that auto followed assume their value of some objects of the "frmAddUser" form, others of an SQL query and other variables predefined in other methods.
A condition that has no complexity is also executed. The problem is the following:
When the variable "name_userVar" has value, everything works fine, when it is variable it has no value I skip the message I define but execute the SQL query that is inside the ELSE as well. This is what I do not want, I should not execute the SQL query.
var
addtipoVarUS, passChangeVar : String;
procedure frmAddUser_btn_save_OnClick (Sender: TObject; var Cancel: boolean);
var
userVar, nombre_userVar, readVar, writeVar, removeVar, searchVar, exportVar, printVar, dataVar, administratorVar, tipoVar : String;
fechaVar, tiempoVar : Extended;
begin
writeVar := BoolToStr(frmAddUser.chbCreate.Checked);
readVar := BoolToStr(frmAddUser.chbRead.Checked);
removeVar := BoolToStr(frmAddUser.chbDelete.Checked);
searchVar := BoolToStr(frmAddUser.chbSearch.Checked);
exportVar := BoolToStr(frmAddUser.chbExport.Checked);
printVar := BoolToStr(frmAddUser.chbPrint.Checked);
dataVar := BoolToStr(frmAddUser.chbDatas.Checked);
administratorVar := BoolToStr(frmAddUser.chbAdmin.Checked);
userVar := SQLExecute('SELECT id FROM users WHERE (login = ''' + sUser + ''');');
nombre_userVar := frmAddUser.edLogin.Text;
tipoVar := addtipoVarUS;
fechaVar := Now;
tiempoVar := Time;
if nombre_userVar = '' then
begin
ShowMessage('The "User" field can not be blank!!!');
end else
begin
SQLExecute('INSERT INTO registros_user'+
'(nombre_usuario, fecha, tiempo, tipo_registro, read, write, remove, search, export, print, data, administrator, pass, id_users) '+
'VALUES("'+nombre_userVar+'","'+DateToStr(fechaVar)+'","'+TimeToStr(tiempoVar)+'","'+tipoVar+'","'+readVar+'","'+writeVar+'","'+removeVar+'","'+searchVar+'","'+exportVar+'","'+printVar+'","'+dataVar+'","'+administratorVar+'","'+passChangeVar+'","'+userVar+'")');
UpdateDatabase('registros');
UpdateDatabase('registros_user');
end;
end;
Any idea of the problem ...
47 2018-09-05 20:53:53
Re: Final version 4.5 (5 replies, posted in General)
No yet. What you reason to use postgresql?
It is free to pay, and better to partition large volumes of data. And I like it more ..., I think you should support it, it would lift MVD to the clouds
48 2018-09-05 18:39:56
Re: Final version 4.5 (5 replies, posted in General)
Hello DriverSoft
Do you plan to support postgresql?
49 2018-09-04 19:30:09
Topic: Connection to a MySQL Database + Configuration connection(INI) + Login (1 replies, posted in FAQ)
The texts in the example are in Spanish.
Install a mysql server and import the "diprod.sql" file
If you wish, you can add some idea or improve something ..., of course, share it with everyone.
50 2018-08-31 14:52:32
Topic: [SOLVED] Write INI file (variable problem) (2 replies, posted in General)
Hello everyone.
I am writing an INI file and I have a problem with a variable type, when I want text strings everything works, but saving integers is where the error jumps. Below I put the code
procedure frm_conf_conecct_btn_save_OnClick (Sender: string; Action: string);
var
ini: TIniFile;
begin
ini := TIniFile.Create(ExtractFilePath(Application.ExeName)+'conf-conection.ini');
try
ini.WriteString('Settings', 'Server', frm_conf_conecct.ed_server.Text);
ini.WriteInteger ('Settings', 'Port', IntToStr(frm_conf_conecct.ed_port.Text));
ini.WriteString('Settings', 'Username', frm_conf_conecct.ed_user.Text);
ini.WriteString('Settings', 'Password', frm_conf_conecct.ed_password.Text);
ini.WriteString('Settings', 'Database', frm_conf_conecct.ed_database.Text);
finally
ini.Free;
end;
frm_start.Show;
end;
ERROR (Incompatible types: Integer, String at 8:56)