Good job. Thanks

2

(4 replies, posted in General)

Thanks

3

(4 replies, posted in General)

Thank you. But I have a problem.
I need to create a calculated field that contains calculated fields from the same table and another table. I write this script but it does not work.

 (1-(SELECT Muro.constante FROM Muro,Sala WHERE Muro.id = Sala.id_Muro)* Sala.TotalMaterialMuro) 

4

(4 replies, posted in General)

Hi, every body
Please can someone provide me with examples of databases with simple and complex calculated fields.
Thanks

5

(2 replies, posted in Reports)

Thanks a lot

6

(2 replies, posted in Reports)

Hi, everyone.

I'm doing a report from a button with "SQL Report" in a search form and a grid. I need that when I do the "search", the report shows the results of the search that are in the grid. I have configured in the "SQL Report" button, in "Select the Grid table (if necessary)" = Table grid1, but when I run the search, it asks me to "select a record in the grid". That is, only one record (the selected one) is shown in the report and not all the data resulting from the search that is in the grid. I need the report to work as the button does (EXPORT TO EXCEL), which shows all the records of the search that appear in the grid.

7

(4 replies, posted in General)

Ok Thanks

8

(4 replies, posted in General)

Hi
The database is already created, but it was created with phpMyAdmin not with MVD

Hello
I have a MySql database already created and I need to create a new project in MDV. I use the connection to MySql by the Connect to MySql button but in MDV I can not see the tables and I can not create the forms.
Thanks

10

(10 replies, posted in General)

I am very grateful for your help

11

(10 replies, posted in General)

What a pity. It worked for me. One last question for now: I need to use the REPLACE function with variables like this:

procedure Form1_Button4_OnClick (Sender: TObject; var Cancel: boolean);
var
  cadenainicial : string;
  cambiarpor : string;

begin
     cadenainicial   := form1.Edit1.Text;
     cambiarpor := form1.Edit2.Text;

     SQLExecute('UPDATE Documentos SET viaDocumento_filename = REPLACE( viaDocumento_filename, cadenainicial, cambiarpor)');
     Form1.TableGrid1.dbUpdate;

end;

But it shows an error message: "No such column: cadenainicial"

Thanks for everything

12

(10 replies, posted in General)

DriveSoft wrote:

Check it out

procedure Form1_Button4_OnClick (Sender: TObject; var Cancel: boolean);
begin
     SQLExecute('UPDATE Documentos SET viaDocumento_filename = REPLACE(viaDocumento_filename, ''F:\MVD Proyectos\Pruebas\lj\Documents\'', ''F:\NewPath\'')');
     Form1.TableGrid1.dbUpdate;
end;

Sorry but the code you propose does not work because the field "viaDocumento_filename" is a calculated field that is updated when I modify or update  the field "viaDocumento" through the visual component DBFile on Form2. If I manually UPDATE the calculated field "viaDocument_filename", when I want to see the document by clicking on the DBFile visual component, it will not open.
What I need is to UPDATE the field "viaDocumento", with the new path, but with the UPDATE command, so as not to do it one by one through the visual DBFile component in form2.

Thank you very much.

13

(10 replies, posted in General)

I attached the project

https://drive.google.com/file/d/1Tk434_ … sp=sharing

14

(10 replies, posted in General)

Thanks for your suggestion but I already tried it but it does not work, because it's a calculated field. The field, type FILE, is called "viaDocument" and when creating the calculated field it is named as viaDocument_filename, but this field is updated when the path and file are selected through the DBFile object.

15

(10 replies, posted in General)

Hi,
I have a field of type FILE and a DBFile object configured as Type Linkfile. In the database I already have approximately 2,000 records with a path to the files. Example:\\192.168.5.6\ Documents\ File000001.pdf, ... \\192.168.5.6\ File001945.pdf
The network manager changed the network address by \\172.25.3.5\ Documents. Something I did not expect. Now I have to change the address
\\192.168.5.6 in all registers to \\172.25.3.5. I can do it one by one, but it would take me a long time. How can I do it with a script?
Thanks

DriveSoft wrote:

Perhaps you have wrong time zone setting in your OS, please check it.
Also you can change calculate field:

CAST(julianday(dateofbirth, 'localtime') - 2415018 as INTEGER)  

CAST(julianday(dateofbirth, 'localtime') - 2415018 as INTEGER) 

Agree. It worked. Thank you very much Dmitry

DriveSoft wrote:

Please attach your project, I will test it.

I have the following query in a button Report(SQL):

select
employees.lastname,
employees.firstname,                                   
julianday(dateofbirth, 'localtime') - 2415018.5833333335,
julianday('now', 'localtime') - 2415018.5833333335
from                                         
employees         

The value of the DATEOFBIRTH field in the table is the same as that of the variable 'now' but in the report they are different. What is this about?

Thanks

19

(4 replies, posted in Reports)

I am sorry. I have already solved the problem

20

(4 replies, posted in Reports)

What a shame Dmitry. When I testing it with Report (SQL) shows error message: no such column: employees.calc_TDatetime.

21

(4 replies, posted in Reports)

Thank you very much Dmitry.

22

(4 replies, posted in Reports)

I need to create a report from an sql query with date fields. The problem is that in fast report I can not give the date field, long date format. In the SQL query the date field I do it as DATE (TABLE.CAMPOFECHA).

This is the query
SELECT 
EVENTOS.NOMBRE as nombre_evento,         
date(EVENTOS.FECHAINICIO)AS inicia_evento

23

(2 replies, posted in General)

How good. Thank you very much Derek

24

(2 replies, posted in General)

Hi
I need disable "Double click" and "Enter" functions  of the table grid. I don´t want run the edit form with those functions. Only  with a buttons.
Thanks

25

(16 replies, posted in General)

Hi
I need disable "Double click" and "Enter" functions  of the table grid. I don´t want run the edit form with those functions. Only  with a buttons.
Thanks