Tool box


https://pp.userapi.com/c855720/v855720591/52c7c/yW2vZTyID7k.jpg


For the work to progress, all tools must be within reach. In our program, there is a toolbar. Despite the fact that the panel table has a very simple structure (see the article "Toolbar. The toolbar_ table"), when displaying it, it would be nice to see which image is attached to a button.


The location of the buttons is also important, so we need a mechanism to easily change the location of the buttons. Unfortunately, My Visual Database does not support Drag & Drop technology, but inside the table you can drag lines with the mouse.


Read the full article: https://vk.com/@createmyvisualdatabaseapp_en-tool-box

1,252

(12 replies, posted in General)

Please, read the article about edit tree structure:

https://vk.com/@createmyvisualdatabasea … row-a-tree

Link to project at the end of the article

Grow a tree


https://pp.userapi.com/c851232/v851232028/13902f/TiUnn2fjcwo.jpg


In addition to the tabular view of the data that My Visual Database provides, there is a component for displaying trees: TdbTreeView. It inherits the TdbStringGridEx class. As a result, many of its properties and methods work similarly, allowing you to create universal event handlers that are suitable for both the tree and the table.


In our project, the menu_ table, which stores information on the main menu, is designed to be displayed using the TdbTreeView component, but changing the tree has its own nuances. In addition, we have an order_num field, which is responsible for ordering items in the tree, but you can not specify a sort in the tree view component settings.


This article examines the functionalities of using visual components, as well as algorithms for changing the display order when displaying tree data.


Read the full article: https://vk.com/@createmyvisualdatabasea … row-a-tree

Roles


https://pp.userapi.com/c853420/v853420119/4f45c/v_r1kVB5uTg.jpg


It's time to create custom roles and assign them object rights. To achieve a comfortable process, we need several interface forms with which the configuration process will be as convenient as possible.


In addition to the rights on forms and buttons, the role configuration includes the default form, which will open after the user logs on.


Read the full article: https://vk.com/@createmyvisualdatabaseapp_en-roles

dbk wrote:

This panel layout is great! I really hoped this was possible with MVD but i didn't know if it was! Do you plan on doing more 'layout' tutorials in the future? Is there a source project file for learning purposes? Thanks for your effort.

Thanks to the help of JB, ready-made translations of several articles, including the articles about creating an advanced user interface. Coming soon smile


Link for downloading projects is at the end of the article. For storage used Google-disk (archiver Win-RAR) -
https://drive.google.com/file/d/1ut9w3g … Hh9pM/view

Settings: base vs code


https://pp.userapi.com/c855436/v855436320/4bb95/ssgsdsgwoPY.jpg


Our project supports the ability to keep project settings in code and database. This is to configure the main menu and rights system. However, a detailed analysis of the current implementation has revealed a problem: deleting all pre-creation data with code and using the built-in database integrity support mechanism may cause loss of manually entered data or blocking deletion due to the presence of associated data. This is to configure the main menu and the rights system. To eliminate the "conflict of interest" between the data added by the script and the data added by the database via the user interface, adjustments must be made to the project.

It is possible that in a real project, you do not need to use both data capture mechanisms at the same time, but some of the techniques described in this article may also be used in applied tasks.


Read the full article: https://vk.com/@createmyvisualdatabasea … se-vs-code

vovka3003 wrote:

"Мультисайтовость" - это фича такая..?

Взяли б уже движок какой-нибудь ([1], [2]) и (относительно) независимый хостинг с нормальным доменом...

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

Мысль про независимый хостинг мне нравится, но до конца не понятна. Обычно хостинг бывает платный и бесплатный. Независимый хостинг мне представляется в виде собственного компьютера, подключенного к домашней сети, и фиксированного IP на роутере.  Или вы имели ввиду что-то другое?

ИМХО  "нормальный" домен - это как "прикольный" номер у телефона: вроде как круто, но только на один раз - либо этот номер оказывается в телефонной книге и абонент получает не менее прикольное название, либо номер идет лесом. Так и сайты: один раз его может быть наберут в адресной строке, а потом он либо в закладках, либо в том же самом лесу, что и прикольные номера телефонов.


А если серьёзно, то все дело, разумеется, в размере бюджета. Если хотите стать партнером или инвестором - велком )))

Multilang


https://lh6.googleusercontent.com/vrY1R_VTjkTDbIAsZCDeFbjXnGsU896546KKJgXOVhrC-izXuE7kWpWOPCV55FDd0_n3lAveCFh8pwj_xQreo9J5aeF8iYi8neBP7m1AE8iHNwY3SRw=w1175


Multilang is a simple and convenient tool for creating localization files used by applications created in the My Visual Database development environment. With Multilang, you can work with several of your projects. The number of languages into which you will translate string resources is unlimited. Localized string resources are grouped by the forms on which they are located. Perhaps both manual editing of the list of resources, and automatic extraction from the project file.


https://sites.google.com/view/multilang-1-0-en

Data Form


https://pp.userapi.com/c851520/v851520911/11fcdf/UMoUV2P89qY.jpg


It is time to define the internal content of our project: we will create several forms that will fulfill two important functions in our project: manage a list of parameters and manage a list of users.


For users, we will add the ability to independently change the temporary password set by the password of the administrator. We will add a password generator to the function collection and improve the mechanisms for building the main menu and storing the images.


Read the full article: https://vk.com/@createmyvisualdatabaseapp_en-data-form

metatron wrote:

Кнопка открыть в Excel создаёт файл экселя с настройками по умолчанию. А соответственно формат всех ячеек устанавливается "общий". Что приводит к тому что все данные формата "0004635" получаются в виде "4635". Заставить эксель открывать новый файл с форматом "текстовый" что привело бы к исправлению данной трудности не получается. Понятно что можно использовать функцию "отчёт" и настроить типы данных, но это значительно сложнее. Как быть в данной ситуации?

Не самое лучшее решение, но проще, чем создание отчёта: добавить пару скриптов на кнопку выгрузки, OnClick & OnAfterClick. В первом обработчике в цикле добавить в нужные ячейки с цифрами символ ' (одинарная кавычка), который в Excel не отображается, но обозначает, что в ячейке текст. А после выгрузки опять пробежаться в цикле и убрать этот символ.

Main Form


https://pp.userapi.com/c845016/v845016136/20e68e/LG_Lhd_xLrk.jpg


We finally come to the main form of the application. The article "First Form" describes in detail how the main form differs from the main form. From the point of view of the simplicity of presentation of the object, the main form is often called Main form and in some projects it is the same form. Therefore, in this article, these two terms will refer to the same form of frmMain.


Knowing that our main goal is to create a universal base from which we can build all the applications (simple and complex) in the future, it is necessary to carefully examine the architecture. After analyzing the current solutions for the user interface, I concluded that at this point, it would be necessary and sufficient to create several panels in the main form, whose configuration (visibility and functional load) can be modified with several settings in the application settings.


Read the full article: https://vk.com/@createmyvisualdatabaseapp_en-main-form

g0dmenuelz wrote:

Hello k245, Thanks for the help
But it's really weird cause I tried cascade delete on docmaster on dochistory the same way you did and it is still giving me an error.

I check - records deleted. But I totally agree with Derek - use to delete the status change.

Deletion is blocked because there is a link (foreign key) in the dochistory table to the docmaster table. You must allow cascade delete.

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

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


Буду признателен вам за обратную связь. Мне очень важно знать ваше мнение как о материале статей, так и о направлении дальнейшего развития учебного проекта. Напишите, пожалуйста, в комментариях, что вы думаете об этой статье? Что ещё хотели бы узнать о программировании в MVD? В следующей статье я планирую рассмотреть альтернативный вариант интернационализации для проекта, в котором локализуемые ресурсы находятся в базе данных. Или более актуальна информация об инструменте локализации существующих проектов? Жду ваших ответов smile

LL10n. Интернационализация


https://pp.userapi.com/c845021/v845021563/217da8/5BISbXPg-wA.jpg


Статья вошла в книгу "Визуальное программирование":  https://mvdlibrary.blogspot.com/p/blog-page_6.html

ToolBar


https://sun1-83.userapi.com/c851136/v851136994/1203f3/Ed4oojA636M.jpg


After the main menu, the second most popular element of the user interface is the toolbar: buttons for quick access to individual items in the main menu.


Because the standard My Visual Database component palette does not have a TToolBar component, you can only implement the necessary features using scripts. In order for the buttons to appear based on the role of the user who entered the program, you must use the rights management system when creating the toolbar.


Read the full article: https://vk.com/@createmyvisualdatabasea … -tools-bar

Cleanup


https://pp.userapi.com/c851136/v851136734/11f2e9/CzhQ2hXu58k.jpg


Our small project already has more than 800 lines of code, while we have not yet started creating the basis of functionality. In My Visual Database there are no restrictions on the number of lines in a script, but it is very inconvenient to scroll through source codes that occupy several screens. In real projects, the number of lines of code can reach several thousand. How can I clean up the scripts to make reading and editing comfortable?


Read the full article: https://vk.com/@createmyvisualdatabaseapp_en-cleanup

Menu


https://pp.userapi.com/c846322/v846322722/2022c2/MHpElTp9xcs.jpg


If your application has more than one form, (there are already five in our basic project), you will definitely need a main menu. In addition to the function of displaying various forms and call procedures, the main menu does a very important job: it presents the user with the functionality of the application. A structured, well-thought-out and easy to understand main menu is one of the features of a user-friendly interface.


The visualization of the main menu can be different: from the classic text at the top of the form to the animation on the whole screen. In this article, the focus will be on menu functionality...


Read the full article: https://vk.com/@createmyvisualdatabaseapp_en-menu

1,269

(24 replies, posted in Russian)

DriveSoft wrote:

При работе с web сервером, предполагается, что пользователь знаком с такими вещами как Apache+PHP+MySQL, это самая обычная и стандартная конфигурацию web сервера.


Можно скачать готовый web сервер
https://www.vswamp.com/


Либо воспользоваться web хостингом, который в 99% случаев подходит для этого.

Спасибо! 

Как-то раз ставил у себя на машинке Wordpress (нужно было инструкцию написать для AD-плагина), тогда тоже была сборка, которая вообще не требовала настройки (была только маленькая инструкция по администрированию самого  Wordpress). Думаю,что и с этим разберусь )))

1,270

(5 replies, posted in Russian)

vovka3003 wrote:

...подозреваю, что в Embed-версиях СУБД такое в принципе не возможно и в сообщении о баге идет речь о каком-то другом способе.

Подозреваю, что речь вообще идёт о потенциальной (возможной) проблеме, которой может и не быть )))  Нашли баг - использование ресурса (области памяти) после его освобождения, а расписали так, что мама не горюй. А вообще странно, что такое в принципе возможно - всегда думал, что после освобождения ресурса попытка доступа к нему приводит к AV.


Вот тут есть информация к размышлению: https://www.vswamp.com - сборка web-сервера, включающая как MySQL, так и SQLite. Решительно - очень полезно читать IT-новости )))

1,271

(24 replies, posted in Russian)

А по проектам WebGrid есть какой-нибудь рабочий пример? Точнее, пошаговая инструкция развёртывания сервера и подключения базы?

1,272

(5 replies, posted in Russian)

vovka3003 wrote:

Надо пробовать...

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

К примеру, для Firebird можно подключить внешнюю DLL c пользовательскими функциями, но только при запуске сервера.  А как это делается у SQLite?

1,273

(5 replies, posted in Russian)

vovka3003 wrote:
k245 wrote:

на лету.

это как..?

Вот описание проблемы по ссылке

Речь идёт об уязвимости класса use-after-free() - «обращение к освобождённой области памяти», которую злоумышленник может использовать, отправляя специальные SQL-команды на устройства, на которых работают базы данных на основе уязвимых версий SQLite. В теории это может приводить к запуску произвольного кода на уязвимом устройстве и к последующему захвату контроля над ним.

Как установили эксперты, проблема кроется в реализации функции SQL Window Functions в SQLite. После обработки выражения SELECT с функцией окна, это выражение преобразуется с помощью функции sqlite3WindowRewrite. И этот процесс включает повторное использование уже удалённого раздела памяти, что может приводить к серьёзному сбою, а в случае, если потенциальный злоумышленник имеет возможность контролировать освобождённый участок памяти, то есть возможность и запуска вредоносного кода.

Из описания следует что "злоумышленник" может разместить в памяти SQL-команду, которая может выполнить произвольный код. Подходящая на эту роль SQL-команда - это вызов внешней функции. Или я что-то не так понимаю? О какой именно SQL-команде, поддерживаемой SQLite, идёт речь?

1,274

(5 replies, posted in Russian)

Однако, полезно читать новости: узнал, что в SQLite можно подключать внешние функции прямо на лету. Кстати, кто-нибудь хоть раз пользовался этой фичей?

1,275

(2 replies, posted in Talks about all)

tcoton wrote:

...some kind of ranking system on the forum to grade participants depending on the usefulness / accuracy / pertinence / quality of the answers?..

How will this rating be determined?