if you know how sqlite works then attaching database will be your best option.
27 2023-10-31 20:46:45
Re: Using a component in a filter query (27 replies, posted in General)
don't show the calculated field on the grid, you can always show the fields(ones that is on the database) e.g. on the example, the info1 and info2. then edit them. calc fields only work as a view.
28 2023-10-31 20:00:56
Re: Using a component in a filter query (27 replies, posted in General)
Beware, if you are using 2 calculated fields using a trim on different fields, you will be able to filter the grids with a text field but you won't be able to edit due to a SQL error telling you that one of the column does not exist. IT looks like the calculated fields are all charged in memory during the application initialization and there can be some mix up. I had to rethink some of my design where I could make a lot of scripts disappear ... but had to redo it.
when you say editing, are you perhaps put the calc field on a component(e.g. TEdit) in a form and add it on the save or make it editable on a grid? That won't work. If you are familiar with SQL, then that calculated field is only an alias, so it is really not in database. It's like SELECT trim(ifnull(info1||'§','')||ifnull(info2||'§','')) AS calcfield FROM yourtable. calcfield is not in database but is only in the result of your query
29 2023-10-30 16:10:33
Re: Using a component in a filter query (27 replies, posted in General)
Hi Both,
I was thinking along the lines of concatenated fields in a calculated field and not using a script at all (see attached).
Be careful with the script option as it could be case sensitive.
Regards,
Derek.
This one rocks. Derek have unlimited imagination.
30 2023-10-30 16:02:56
Re: Using a component in a filter query (27 replies, posted in General)
OK. Looks like I have no other choice but to keep it in the script... The one in attachment is working as intended.
Good to know, but if you really hate it to have query on the dcu, then embed it on the form.xml. imagination is the key. It'll be visible also but i think it'll be hard.
31 2023-10-30 15:08:27
Re: Using a component in a filter query (27 replies, posted in General)
That's one of MVD's limitation I think. Just do some script and do make use advantage of the Tablegrid dbFilter.
32 2023-10-28 16:26:46
Re: What is the use of #checkbox (8 replies, posted in General)
here's another example of script to force the checked row as selected before executing the delete function
33 2023-10-28 16:19:35
Re: What is the use of #checkbox (8 replies, posted in General)
Hello pozidis
The check mark allows you to visually select the lines of a grid on which you want to apply an action (move, delete, edit on a state, etc.).
It does the same job as the Multi-Select option but without its visual aspect.
JB
the default delete function of the button doesn't really delete the checked ones with this #checkbox, so it needs to be done via script unfortunately.
34 2023-10-28 16:07:16
Re: What is the use of #checkbox (8 replies, posted in General)
Care to elaborate on what you really want to do? for multi-delete, you really don't need that checkbox actually, Just checking grid property Additional > Options > goMultiSelect, you can have your multi-delete. using the button. you can simply select by clicking while holding your keyboard's Shift(select all from the selected to the next row to select) or Ctrl(individually selecting row). You need to do some scripting for other checkings you want to do before deleting. You can also click one record from the grid and hit Ctrl+A to select all rows.
35 2023-10-26 05:38:14
Re: Delete secected rows (6 replies, posted in General)
it is a constant. stores value(in that case, an integer) such as integer, string, real, etc...
it is accessible all through out your script in any function or procedure.
i want storing such value in the constant so that later on, i can only set it in the top.
4 is the column index on the grid. so say for example you change the arrangement of the grid, like adding a column before the current index 4, all you have to do is change the constant value, then all is well.
check that i used the constant ID_IDX in different procedures
Form1_Button5_OnClick
Form1_TableGrid1_OnChange
Form1_Button4_OnClick
Form1_Button6_OnClick
I could just set it to its corresponding value(4) like for example
SQLExecute('DELETE FROM Names WHERE id='+Form1.TableGrid1.Cell[4,i].AsString);
and in the other procedure but, then, when you decided to re-arrange your grid (like adding a column), what will happen is you will have to look on all the procedure with that index 4 and a big chance(this happens a lot) to omit some value that needs updating and sometimes it'll not throw an error, but will give an unexpected or unnoticeable output and will eat your time to just looking for that code/s.
Check on the Settings of the TableGrid1, notice that I added Names.id right after Names.tsek it is at 5th column (index:4)
37 2023-10-22 22:38:36
Re: date filter (8 replies, posted in General)
I think it is better to make a simple test on the problem you encountered (incompatible "extended" type). It is faster to spot the problem in this way.
If the output is can be done by a simple search, then make use of it. making it to script is a last resort for me.
38 2023-10-18 15:18:01
Re: ParentComboBox (11 replies, posted in General)
I cannot find or test the Property for the ParentCombobox.
dbFilter is a better workaround for me. It's powerful and can be used in so many way.
39 2023-10-16 16:35:19
Re: my solution to debug errors (5 replies, posted in General)
but if you really want to have the minimal keyboard interaction when changing the uses, then i'm thinking something like this
procedure m(aMsg: Variant);
begin
ShowMessage(VarToStr(aMsg));
end;
procedure xm(aMsg: Variant);
begin
// do nothing
end;
m(1);
m('two');
xm(1);
xm('two');
adding/removing x before the test will just take 1 keystroke from your keyboard. rather than delete, then typing 1 or 0.
40 2023-10-16 16:23:11
Re: my solution to debug errors (5 replies, posted in General)
im using a similar procedure to this one.
procedure sm(aMsg: Variant);
begin
ShowMessage(VarToStr(aMsg));
end;
sm(1);
sm('two');
i'm curios to what will be the use case of v: integer.
are you perhaps want to disable the message before deploying your application?
if so, I would rather comment the line, than looking for all my uses of the procedure
begin
// ShowMessage(VarToStr(aMsg));
or if you want to keep the test, then why not just comment the line of the test.
sm(1);
// sm('two');
41 2023-10-06 13:48:30
Re: Color Patern - Solved (6 replies, posted in General)
You need to execute it
42 2023-09-30 05:50:41
Re: Continue printing in the second page (4 replies, posted in General)
been working with fastreport embedded in MVD for couple of years now and I just learn this trick now. Thanks sparrow.
43 2023-09-30 04:28:46
Re: RC5 Encrypt and Decrypt (2 replies, posted in General)
Source for Delphi:
https://delphisources.ru/pages/faq/base … ption.html
Thank you for this one. Will add this as a reference.
44 2023-09-28 22:00:07
Topic: RC5 Encrypt and Decrypt (2 replies, posted in General)
Hello. Is there anyone know what was used in the functions EncryptRC5, EncryptFileRC5, DecryptRC5 and DecryptFileRC5? I want to access encrypted file/String from this function and access it on my Delphi application.
Thanks in advance.
45 2023-08-15 09:47:59
Re: myvisualdb : last update in 2021 (3 replies, posted in General)
Hello. Dmitry do have official statement on not continuing MVD. But it is a mature one. I've built several database applications with this one. For me, having developing on Delphi for quite some time now is a plus. MVD for me rocks if you want to develop standalone database applications. Shifted to Delphi due to software requirements, If the map just been updated, this is solid.
46 2023-05-25 06:51:45
Topic: DynamicWrapperX (1 replies, posted in General)
Hello, Is DynamicWrapperX not working? It throws error Invalid class string ProgID: DynamicWrapperX.
I want to load dll function on my application.
47 2023-04-14 14:49:37
Re: Supported MySQL client version with mvd (5 replies, posted in General)
oh. nevermind. got it working. thanks to chatgpt. it is a server side thing. just change to mysql_native_password on your mysql 8 yves if it is not a big deal on the security measures of your mysql database server and you can connect to it. thanks CDB. been looking for this for quite sometime now.
48 2023-04-14 14:39:43
Re: Supported MySQL client version with mvd (5 replies, posted in General)
There is the possibility you need to change the Authentication method, I have used v8.0 with MVD some time ago and I had to set the authentication method to the legacy type.
do you perhaps have with you a snippet or sample on how to change the auth method?
49 2023-04-13 21:37:41
Re: Piechart Shadow (2 replies, posted in General)
Hi Brian,
Not sure if this is what you needchart.view3d := false;
Regards,
Derek.
this is neat, thanks derek. I think ill just have a toggle button to do the trick. but if there are other options that can retain 3d and just remove shadow, that'll be awesome.
50 2023-04-13 21:32:55
Re: Supported MySQL client version with mvd (5 replies, posted in General)
Hello Yves,
I'm using MySQL version 5.6.51 for my MVD LAN-based projects. Unfortunately if I'm not mistaken, this is the latest mysql version you can use with MVD.