Hi,
You are probably selecting the wrong field to show in the tablegrid.
You should choose the actual field from the related table rather than the relationship ID (have a look at the screenshot based on my previous example that hopefully makes it clear).
Derek.
51 2026-02-20 11:41:32
Re: ComboBox result (1 replies, posted in General)
52 2026-02-19 16:12:26
Re: SQL Reset/Delete (2 replies, posted in SQL queries)
Hi,
At its simplest, add something like this to your script
procedure form1_Button1_OnClick (Sender: TObject; var Cancel: boolean);
begin
sqlexecute('delete from mytable');
sqlexecute('delete from sqlite_sequence WHERE name = "mytable"');
end;See the attachment for a working example where you have to delete tables according to their dependencies (ie delete 'companies' before 'countries' and 'industrysectors').
n.b. in the attachment, the sqlite.db has been copied a couple of times so you can recreate your data if required).
Regards,
Derek.
53 2026-02-18 15:33:00
Re: Adaptable form (4 replies, posted in Script)
Hi Sabine,
From what I can remember, there are a couple of things that don't behave well(!) when using scale-by - mainly the height of rows in tablegrids - but I'm sure that's something that can be improved by adding some extra code in the script.
Derek.
54 2026-02-18 14:06:18
Re: Adaptable form (4 replies, posted in Script)
Salut Sabine,
It's one of those problems that is always hard to demonstrate if you don't have a variety of monitors to test things out on.
However, there's been quite a few posts relating to screen size and resolution which may help.
Attached are two suggestions (credit to Just4Fun) that, although they might not be exactly what you are looking for, should give you some ideas.
I also remember Sparrow giving useful tips on this general topic too (try searching for 'screen scaling in MVDB') to see the conversation.
Hope this helps,
Derek.
55 2026-02-13 20:18:31
Re: How To Save Or Copy All myvisualdatabase.com/forum Offiline ? (13 replies, posted in Script)
Salut Destiny, Привіт Sparrow,
I used the default settings with HTTTracker and it was running for over 24 hours - it seemed to be picking up links from every corner of the internet and was well over 50gb when I cancelled it
!
Destiny - I've downloaded your off-line version of the Forum and it is excellent - if the worst comes to the worst and the Forum goes down, at least we will still have this valuable reference.
Additionally, I am using DocFetcher as a 'front-end' search engine for your download and it works pretty well (and no having to wait 30 seconds before the next search!).
Thanks for your help,
Derek.
56 2026-02-12 18:39:23
Re: How To Save Or Copy All myvisualdatabase.com/forum Offiline ? (13 replies, posted in Script)
Understood,
Thanks Destiny.
Derek.
57 2026-02-12 12:19:28
Re: How To Save Or Copy All myvisualdatabase.com/forum Offiline ? (13 replies, posted in Script)
Hi Destiny, Jean,
I tried to do the same with HTTrack but kept having problems with 'illegal characters'.
Is there any chance you could upload your copy to a file-sharing site so that those of us who are interested can download it.
Merci,
Derek.
58 2026-01-06 23:59:09
Re: Editable Tablegrid Behaviour (4 replies, posted in General)
Hi Sparrow,
It looks like a very good way to add some basic validations to various columns when using editable grids (something that I've always found a bit weak in standard MVD).
Thanks,
Derek.
59 2026-01-06 00:43:22
Re: Editable Tablegrid Behaviour (4 replies, posted in General)
Hi Sparrow,
Yesssss! it works exactly how I need it to now.
I really like how you use '+form1.tablegrid1.columns[c].fieldname+' to update different fields depending on the column that you are positioned on - never seen that done before; one to remember for future use.
Thanks as always for your help,
Derek.
60 2026-01-05 19:33:48
Topic: Editable Tablegrid Behaviour (4 replies, posted in General)
Hello All,
I am using an editable tablegrid and the aim is to make data entry as easy as possible (see attached sample project).
The tablegrid is configured so that you use the arrow keys to enter a value in a tablegrid cell and then, again, using the arrow keys, can quickly go to the next column, the next row etc; there is no need to actually 'click' in the relevant cell before entering a value.
If data has already been entered in tablegrid cells and you want to change these values, again, using the arrow keys, you go to the required cell and simply replace an old value (ie 2) with a new value (ie 3) again - without having to first click in the cell.
However, if you want to delete a value, you have to first click in the cell and then use the space bar (or the 'esc', or 'backspace' or 'delete') key.
So the question is why can you enter / replace one value with another without having to click in the relevant tablegrid cell but when you want to delete a value, you first have to click in the relevant tablegrid cell?
It is not only to speed things up but also to eliminate the inconsistency.
I would appreciate any ideas that anyone might have.
Using MVD 6.5 and Windows10..
Thanks,
61 2026-01-03 16:15:59
Re: CheckBox on top of a grid (4 replies, posted in General)
Salut les deux,
Jean, désolée d'apprendre que tu as la grippe. Il me semble que c'était une forme assez virulente cet hiver.
Attached is one option which might help you (but I don't imagine that it's too different from what you've already done yourself).
Regards,
Derek.
62 2025-12-23 19:12:15
Topic: Merry Christmas / Joyeux Noël / С Рождеством / Веселого Різдва (9 replies, posted in General)
A Merry Christmas to all active users of MyVisualDatabase - sadly a decreasing number, but nevertheless true fans of this fantastic software.
To Dmitry, wherever he now is and I wish him much success with any new ventures.
And especially to those who have helped me with various issues throughout 2025 - still learning!
Best wishes and Peace in 2026.
Derek
63 2025-12-22 11:15:47
Re: Newb question (1 replies, posted in General)
Hi,
I'm not sure why you would want to set the tablegrid to 'enabled := false;' but if you do it that way, then you won't be able to select a row.
I think a better way to do this is to leave the tablegrid as 'enabled = true' and simply not associate any actions (other than 'show') with it (the tablegrid by default doesn't actually 'do' anything until you tell it to). Optionally, you could also disable the tablegrid's pop-up menu to prevent any further action - see attached).
Obviously, the next question is how you plan to add or delete records but maybe you are using a different form for that.
Derek.
64 2025-12-17 19:13:21
Re: Записи субьекта, отвечающие только за выбранный субьект (25 replies, posted in Russian)
Это не ошибка MyVisualDatabase.
Вам не нужно (точнее, вы не можете) сохранять вычисляемые поля. В этом нет смысла, поскольку поля, определенные в вычислении вычисляемого поля, сами уже сохранены, и, следовательно, вы вносите избыточность данных (что (строго говоря) недопустимо в реляционной базе данных).
Удалите вычисляемые поля из действия «сохранить», и ошибка должна быть исправлена.
Derek.
.
Два примера, демонстрирующие, когда можно использовать вычисляемое поле.
1. Для отображения возраста человека.
У вас есть поле для «даты рождения» этого человека, и его возраст («сегодня» - «дата рождения») отображается как вычисляемое поле. Хранить его в базе данных бессмысленно, потому что уже через один день оно будет неверным.
2. Для отображения «значения» чего-либо.
У вас есть поля для «цены» и «количества» чего-либо, поэтому его «значение» («цена» * «количество») может отображаться как вычисляемое поле; хранение его «значения» в базе данных также приводит к избыточности данных.
65 2025-12-15 20:21:21
Re: Записи субьекта, отвечающие только за выбранный субьект (25 replies, posted in Russian)
Привет,
Если вы хотите сделать это так, как вы это задумали, вам понадобится второй фильтр в форме ohp_add (см. вложение).
Однако я думаю, что настоящий вопрос в том, почему вы делаете это таким образом. Какую информацию отображает ohp_add.tablegrid1, которую вы еще не видите в отдельных полях редактирования и т. д.
Обычный способ сделать это — переместить tablegrid1 из ohp_add в tpp_ohp_main и использовать его в качестве начального фильтра (при этом tpp_ohp_main.combobox1 вообще не нужен).
Кроме того, зачем использовать сценарий для получения записи, которая будет отображаться в ohp_add, а не стандартную функцию «Показать запись»?
Derek.
66 2025-12-13 16:56:49
Re: Rounding to the Nearest Whole Number (3 replies, posted in General)
Hi Fmr,
You could try it like this (see attached) but there are probably other ways too.
The 'round' command by default rounds up or down depending on the value used so if it rounds down, simply add 1 to the result.
Regards,
Derek.
67 2025-12-07 10:36:10
Re: Show Modal (6 replies, posted in General)
Hi,
The syntax to keep a form 'on top' is:
procedure Form1_OnShow (Sender: TObject; Action: string); //** set 'stay on top'
begin
form1.formstyle := fsstayontop;
end;However, this is typically used more to keep your entire application on top of other programs that might be running.
Regards,
Derek.
68 2025-11-26 19:45:45
Re: Age Calculator (Calculate 2 Date) (16 replies, posted in General)
Hi FMR, Jean, Sparrow,
Fixed a couple of things - think it should be okay now.
Everything tested against https://www.timeanddate.com/date/duration.html to check for accuracy.
Any problems, please let me know.
Derek.
69 2025-11-25 18:48:50
Re: Age Calculator (Calculate 2 Date) (16 replies, posted in General)
Hi FMR, Salut Jean (ça va ?),
I think you might have some problems with your project due to variable month lengths, especially in a leap-year (try testing it with dates of 27/02/2024 - 02/03/2024 and then 27/02/2025 - 02/03/2025 to highlight this issue).
Attached is another option which tries to get around this by using the 'daysinmonth' function.
Regards,
Derek.
70 2025-11-13 12:09:47
Re: Где кто? (16 replies, posted in Russian)
Hello Jean,
Yes, all good here - hopefully the same at your end.
I looked at Lazarus a while ago but kept returning to MVD - for me, I just find it quicker to develop something and, although there may be fewer features in total, they are ones that I often use..
And since 'styles' were added to MVD, I think you can develop good looking applications with not much effort.
Although I've been using MVD for quite a while now, I'm always amazed at some new function or 'trick' that I discover. It makes me realise that with MVD, the more you explore, the more you discover.
And up till now (and often with help from other Forum users), there's nothing that I haven't been able to get done.
But I also remember that you have a Delphi background, so Lazarus would make a lot of sense to you as well as MVD.
Derek.
71 2025-11-11 10:58:06
Re: Где кто? (16 replies, posted in Russian)
Поскольку MyVisualDatabase больше не находится в активной разработке, активность на форуме неизбежно снизится.
Я думаю, что отклик на форуме во многом зависит от того, как вы задаёте вопрос. К сожалению, шаблона для сообщения о проблемах нет (что, на мой взгляд, было бы полезно), но, на мой взгляд, как минимум, стоит попробовать:
* кратко описать (цель и задачи) того, чего пытается достичь ваш проект (чтобы обозначить контекст вашей проблемы);
* дать чёткое и подробное объяснение вашей конкретной проблемы (то, что очевидно вам, не будет очевидно другим, особенно потому, что многие из нас будут использовать онлайн-переводчик).
* приложить проект с достаточным количеством существенных данных для иллюстрации вашей проблемы.
* указать, что вы уже пробовали и что не сработало (вместо того, чтобы задавать вопросы бездействуя); довольно часто этот вопрос поднимался (и на него уже были даны ответы) в других разделах форума.
* если применимо, предоставьте некоторые объёмные данные — решение для одного пользователя и нескольких сотен строк данных может отличаться от решения для многих пользователей с тысячами строк данных.
* Укажите, какую версию MVD и Windows вы используете.
По моему опыту, ответы других участников форума всегда были чрезвычайно полезны, особенно учитывая, что они волонтёры и щедро делятся своим временем бесплатно.
Derek.
.
.
Since MyVisualDatabase is no longer in active development, forum activity is bound to decline.
I think the response you get on the forum depends a lot on how you ask the question.
Unfortunately, there is no template for asking for help (which I think would be useful), but in my opinion, at a minimum, you should try to:
* give a brief overview (goal and objectives) of what your project is trying to achieve (to indicate the context of your problem);
* give a clear and detailed explanation of your specific problem (what is obvious to you will not be obvious to others particularly because many of us will be using an on-line translator).
* attach a project with enough relevant data to illustrate your problem.
* indicate what you have already tried and what has not worked (instead of just raising questions without doing anything); quite often an issue will have already been raised (and answered) elsewhere in the forum.
*if relevant, provide some volumetrics — a solution for one user and a couple of hundred rows of data may differ from a solution for many users with thousands of rows of data.
* specify which version of MVD and Windows you are using.
In my experience, the responses of other forum participants have always been extremely helpful, especially considering they are volunteers and generously give their time for free.
72 2025-11-06 15:24:14
Re: Tic-Tac Game on MVD 5.6 (13 replies, posted in General)
Hi Roberto, Sparrow,
You first need to click on a number (1-9) and then click in the cell where you want to place that number. Perhaps you are trying to do it the other way round?
Similarly, if you want to place "possible" numbers, first click on a number (1-9), then click on the 'pencil' and then click in the cell(s) where you want to place that "possible" number (it's a really neat feature).
Thanks,
Derek.
73 2025-11-06 13:10:21
Re: Как програмно ппрописать значения (2 replies, posted in Russian)
Привет Oleg!
Есть несколько вариантов.
1. Вы можете жёстко задать требуемые значения (см. приложение «Пример 1» как один из способов).
Но этот подход очень строгий и может привести к дополнительной работе, если потребуется добавить новые значения или изменить существующие.
Возможно, лучшим вариантом будет использование уже доступной функции «Роли».
2. Используйте «Роли» для ограничения доступа определённым пользователям; это позволит добавлять/изменять значения в будущем (см. «Пример 2»).
a) Если вы войдете в систему как «oleg» (пароль «oleg»), у вас будет полный доступ.
б) если вы входите в систему как «derek» (пароль — «derek»), на экране «конфигурации» опция сохранения «СТАТУСА» недоступна (как и опция сохранения «ПОЛЬЗОВАТЕЛЕЙ»).
«Роли» — одна из самых мощных функций MVD (но, как я подозреваю, используемая нечасто).
С уважением,
74 2025-10-31 10:29:59
Re: Drag a Form (8 replies, posted in General)
Hi Sparrow,
Edit1 is not doing anything now - I'd just forgotten to remove it.
I'd been trying to make the clock flash every second and needed a form object that I could attach an 'on change' procedure.to.
But in the end, the flashing was just annoying (and giving me a headache
) so I didn't bother!
Attached is a version that has been cleaned up.
Regards,
Derek.
75 2025-10-31 00:46:55
Re: Drag a Form (8 replies, posted in General)
Hi Sparrow, Salut Jean,
A simplified version of the project (without any reminders / alarms) that shows the time on screen in an 'always on top, 'see-through' style (left mouse button and hold to drag it around the screen, right mouse button to close it).
Regards,
Derek.