101

(10 replies, posted in General)

result
https://myvisualdatabase.com/forum/misc.php?action=pun_attachment&item=10106&download=0

102

(10 replies, posted in General)

project

103

(10 replies, posted in General)

MVDB does not work well if the nesting depth when setting up a table exceeds 2. In your case, it is enough to replace the nested table with a calculated field smile


https://myvisualdatabase.com/forum/misc.php?action=pun_attachment&item=10104&download=0

104

(10 replies, posted in General)

You can add a calculated field and use it in a dropdown list.

105

(1 replies, posted in General)

If the namespace (tables, forms, procedures) in two projects does not overlap, then you can combine them by simple merging. In theory. But in practice, difficulties may arise if the code contains direct access to system objects of the main form (components related to reports, authorization, etc.). And most likely the problems will be due to the same name of the forms (especially the main form).

sidhillsaid wrote:
k245 wrote:

Таймер создайте, в обработчике таймера читайте данные из порта и записывайте в БД.
Или вам нужна готовая программа?

Вообще готов обсудить вариант готовой программы, если это возможно. Могу написать Вам на почту?
В целом хочется разобраться самому, но сроки достаточно сжаты.

Пишите, договоримся ))

Таймер создайте, в обработчике таймера читайте данные из порта и записывайте в БД.
Или вам нужна готовая программа?

108

(3 replies, posted in Reports)

It is unlikely that there will be a psychic here who can help you without seeing your project )

109

(13 replies, posted in General)

sparrow wrote:

Another option

Beautiful. Effective. You are on top as always!

I observed problems with column width in two cases: during the first launch and when the program crashed.
As for intelligent alignment of column widths, you can’t do without scripts. I agree that in some cases the proposed alignment options look good, but firstly, they provide an additional delay when displaying data, and secondly, they are not always convenient, so this, perhaps, can be done as an option in the grid settings through the pop-up menu. Thanks for the tip, I'll probably add such an option in the next version of Data Keeper.

The problem of comboboxes is appears when adding new entries to the lookup table with a large number of comboboxes. The fact is that every time an entry is edited/added to a table, UpdateDatabase() is automatically executed for this table and, as a result, all comboboxes associated with it are updated. If you have 10 editing forms and each has a combobox, then the wait time may become unacceptable. The same thing happens when you launch the application.

As an option, you can display a splash screen when the application starts before it connects to the database (in the begin end. section) to brighten up the waiting time.

https://k245.ru/wp-content/uploads/2023/11/image-8-1024x573.png
For large data sets, I abandoned the combobox,
https://k245.ru/wp-content/uploads/2023/11/image-9-1024x598.png
replacing it with two components: an input field (to display the selected value) and a button (to display the reference form). Of course, you will need scripts, examples of which can be found in this project.
https://k245.ru/en/mvdb-en/light-filtered.html

113

(30 replies, posted in Russian)

pavlenko.vladimir.v wrote:
k245 wrote:

У меня работает со стилями без проблем. см. проект ComponentExplorer

https://fileworld.pavlenkovv.ru/img/ScreenRecorderProject1.gif
Я даже винду переустановил..
Может это и есть, то что называется, утечкий памяти?

Может, в этом дело?
https://myvisualdatabase.com/forum/misc.php?action=pun_attachment&item=10080&download=0

Light filtered
https://k245.ru/wp-content/uploads/2023/11/svetloe-filtrovannoe.jpeg
It’s cool November outside, so this article will not be about a refreshing drink in the summer heat, but about the filtering mechanism in the Data Keeper project, as a result of which we should receive filtered data. Of course, they will only be light if you use a light theme for the application.
https://k245.ru/en/mvdb-en/light-filtered.html

Image revolution
https://k245.ru/wp-content/uploads/2023/11/unicode-character-pl_sql_large.jpg
Using Unicode characters as button images. Improvement of the Images.pas module.
https://k245.ru/en/mvdb-en/image-revolution.html

116

(30 replies, posted in Russian)

pavlenko.vladimir.v wrote:
sparrow wrote:

А что вы хотите сделать со стилем ?
И в чем ошибка ?

Если приложение использует стили, то использование RichEdit  приводит к ошибке

https://k245.ru/wp-content/uploads/2023/06/izobrazhenie_2023-06-02_111056371.png

У меня работает со стилями без проблем. см. проект ComponentExplorer
https://k245.ru/software-ru/is-ru/rukov … chika.html

117

(30 replies, posted in Russian)

jrga wrote:

If you can't answer, that's okay: how did you incorporate SCRIPT.DCU into the executable?

Let me make a guess: the system needs either script.dcu (compiled script.pas) or script.pas. Script.pas is available in this project.

118

(13 replies, posted in General)

The appearance of the TProgressBar component starting from Windows 7 is determined by the operating system settings. But if you use style, then the progress bar becomes stylish too.
https://k245.ru/wp-content/uploads/2023/03/Progress-s-knopkoj.png

119

(22 replies, posted in Russian)

andrey.yugay wrote:
sparrow wrote:
for i:=0 to 30 DO

Заработало, спасибо огромное

Получается, что диапазон индексов при объявлении массива игнорируется, учитывается только размер, а индекс всегда начинается с нуля?

Светлое фильтрованное
https://k245.ru/wp-content/uploads/2023/11/svetloe-filtrovannoe.jpeg
Data Keeper - автоматическое построение панели фильтрации объектов заданного класса на основании списка свойств.
https://k245.ru/mvdb/svetloe-filtrovannoe.html

tcoton wrote:

Yeah but that is not a good practice database design, having redundant data!!

The best would be, in case of "not null" constraint, to set the value to 0 or whatever value is set by default for "not null" instead of "null" when removing a manager from an employee hierarchy. That cannot be done without a script since the default action of Myvisualdatabase is to set a field to "null" when deleting.

I agree, but if a tree-like hierarchy is required, then you cannot do without the NULL value in the reference to the parent of the root elements.

tcoton wrote:

Thanks a lot K245!! That is a trick worth knowing and it saves a lot of headaches.

I agree that with this method, the "not null" constraint must be removed, it was set to work with my workaround, but if you remove a manager from someone at some point, you get an error because of the "not null" constraint.

In this case, it is necessary to add a check before deleting an entry: if the entry being deleted is referenced as a manager, then report this and not allow deletion.


There may be several options: 1) do not delete; 2) reset the link in dependent records to NULL; 3) delete along with dependent records. In your case, the first or second option will be suitable.


In real systems, records are rarely deleted unless they were entered to test the system. Typically, flags are used to indicate that the entry is being archived and should not be displayed in normal cases.


But your case is even more interesting. I would add a separate table - managers, which would link to the employees table. In this case, when dismissing or changing a manager, you do not need to edit all the employees who linked to him, but rather make one edit in the manager table, linking it with another person or with a special record, where instead of the first and last name it will be written “Position vacant”

123

(11 replies, posted in General)

Sorry, it was my mistake - I forgot to set the TableName component property  sad

legolas-novo wrote:

Я просто не хотел добавлять пользователей, оставить вход без пароля и все максимально упростить. Один человек двойным кликом открывает приложение и вносит данные, другой человек двойным кликом открывает приложение и видит эти данные. Ну а так видимо придётся создавать права, пользователей и тд. Спасибо за ответ!

Вы можете сделать два приложения, если так вам проще. Но не делайте две базы, настройте подключение базы через настройки параметров. А чтобы информация обновлялась в "клиентском" варианте прямо в процессе работы, добавьте кнопки обновления таблиц или делайте обновление по таймеру.

А зачем вам две базы? Вы сначала пишете про клиентскую версию приложения, у которого нет функций добавления данных, но которая будет подключаться к общей базе? На самом деле всё ещё проще: для ограничения доступа достаточно задействовать встроенную систему управления правами, и тогда одни пользователи смогут редактировать данные, а другие - только просматривать, и использовать для этого только те формы, которые вы им разрешите.