(32 replies, posted in General)

I would love to translate documentation and examples into English, but my economic situation does not allow me to do so much time to create the necessary volume in a reasonable time. Perhaps I would supplement my basic training course with practice for DataExpress, but I don’t understand how many English-speaking users will want to master it ...

I would like to take this opportunity to ask: who would be interested in comparing the two systems in practice after completing a basic course on creating no-code applications in My Visual Database & DataExpress?

DBMS choice

The My Visual Database (MVDB) development environment allows you to use two DBMSs: SQLite and MySQL. The type of DBMS used can be changed during the development process at any time. But which DBMS should you choose for your application?

Read: https://k245.ru/en/mvdb-en/dbms-choice.html


(4 replies, posted in General)

Possible reason: you copied the database from another project and the current database does not contain this table, but you still have settings from this table in the data designer in your project.
More precisely, you can say if you add your project.

Выбор СУБД


Среда разработки My Visual Database (MVDB) позволяет использовать две СУБД: SQLite и MySQL. Тип используемой СУБД можно изменить в процессе разработки в любой момент. Но какую СУБД выбрать для вашего приложения?

Читать: https://k245.ru/mvdb/vybor-subd.html

k245 wrote:

Production: Аccounting And Сontrol


While looking at KWORK applications for software development, I found an interesting request, apparently from a self-employed or an entrepreneur who has his own small production: we need a simple program for analyzing the profitability of the production process, in fact – accounting for the materials used and comparing with the profit received from the sale of finished products . Of course, for a complete analysis, it is also necessary to take into account the costs of electricity, rent of premises, depreciation of equipment, taxes, etc., but in some cases it is enough to control only materials and finished products.

Read: https://k245.ru/en/mvdb-en/production-a … ntrol.html

The article was translated into French. Many thanks to Yann Yvnec:

https://k245.ru/fr/mvdb-fr/comptabilite … trole.html

k245 wrote:

Border Outpost


A single click is sometimes enough to launch an application. But sometimes the startup time is longer than the expected one or two seconds, and then the user may have the feeling that the program has frozen and something has gone wrong. This can be avoided by reducing the time until the first window appears, which is called the splash screen.

Read: https://k245.ru/en/mvdb-en/border-outpost.html

The article was translated into French. Many thanks to Yann Yvnec:



(7 replies, posted in General)

reteinformatica wrote:

Hi v_pozidis and sparrow,
I find this discussion very interesting
I wonder how one could go about creating an automatic update.
Let's say someone updates a project and a table with related fields has been added to the new project:


Table name = A
Table field name A = 1


Added table with name = B
Added field to table B with name = 2

Theoretically it could be:

1) in database 'name' create table 'B'

2) in table 'name' create the field '2', text, mandatory etc.

The only thing is that I really don't know how to develop it programmatically.


procedure DB_AddField(ATableName: string; AFieldName:string; AType:integer );
// добавление поля
  tmpSQL := 'ALTER TABLE ['+ATableName+'] ADD COLUMN ['+AFieldName+'] ';
  case dbType of
  DBT_UNKNOW: RaiseException('DB_AddField - не поддерживается для типа базы DBT_UNKNOW');
  DBT_SQLITE: begin
  case AType of
  DB_TEXT_FIELD: tmpSQL := tmpSQL + ' TEXT';
  else RaiseException('DB_AddField - не поддерживается тип поля: '+IntToStr(AType));
  DBT_MYSQL: RaiseException('DB_AddField - не поддерживается для типа базы DBT_MYSQL');

function DB_FieldExists( ATableName: string; AFieldName:string ):boolean;
// проверяет существование таблицы
  case dbType of
  DBT_UNKNOW: RaiseException('DB_TableExists - не поддерживается для типа базы DBT_UNKNOW');
  DBT_SQLITE: begin
    // Result := SQLExecute('SELECT COUNT(*) AS CNTREC FROM ( pragma_table_info('+ATableName+') WHERE name="'+AFieldName+'" )' ) = 1; // SQLite - не работает в MVDB, но работает в SQLiteStudio
    Result := False;
    SQLQuery('PRAGMA table_info(['+ATableName+']) ',tmpDataSet);
    while not tmpDataSet.EOF do
      if UpperCase( tmpDataSet.FieldByName('name').asString ) = UpperCase( AFieldName ) then
        Result := True;
  DBT_MYSQL: RaiseException('DB_TableExists - не поддерживается для типа базы DBT_MYSQL');

function DB_TableExists( ATableName: string ):boolean;
// проверяет существование таблицы
  case dbType of
  DBT_UNKNOW: RaiseException('DB_TableExists - не поддерживается для типа базы DBT_UNKNOW');
  DBT_SQLITE: Result := SQLExecute('SELECT COUNT(*) FROM sqlite_master WHERE type="table" AND tbl_Name="'+ATableName+'"') = 1; // SQLite
  DBT_MYSQL: RaiseException('DB_TableExists - не поддерживается для типа базы DBT_MYSQL');


  if not DB_TableExists('blank') then
    tmpSQL := //
      '  CREATE TABLE blank ( '+CR+//
      '    length INTEGER NOT NULL '+CR+//
      '                   DEFAULT 0, '+CR+//
      '    qty    INTEGER NOT NULL '+CR+//
      '                   DEFAULT 0, '+CR+//
      '    basic  INTEGER NOT NULL '+CR+//
      '                   DEFAULT 0 '+CR+//
      '); ';

  if not DB_FieldExists( 'order', 'comment' ) then

Cat in a bag


The style selection mechanism in My Visual Database applications is like buying a pig* in a poke: it is impossible to imagine what the program will look like with the selected style until a reboot. A few lines of code will help us solve this problem.

* in Russian - a cat

Read: https://k245.ru/en/mvdb-en/cat-in-a-bag.html

Analyzing modules


Storing information about projects has far-reaching goals: analysis of source code and architecture with recommendations for their optimization.

And let’s start with a simple task: extracting information about the contents of the module, in particular – finding and displaying procedures and functions.

Read: https://k245.ru/en/mvdb-en/analyzing-modules.html

Кот в мешке


Механизм выбора стиля в приложениях, созданных в My Visual Database, напоминает покупку кота в мешке: до перезагрузки невозможно представить, как будет выглядеть программа с выбранным стилем. Несколько строчек кода помогут нам решить данную проблему.

Читать: https://k245.ru/mvdb/kot-v-meshke.html


(5 replies, posted in General)

Hi Joshua,

This won't help in finding Derek's project now, but it may help in the future - I've added the ability to store project descriptions in the "Developer's guide".


Here is the version with modules and bug corrected (labDescription)



(5 replies, posted in General)

Hello Destiny, Fabio! If you use the SQLite DBMS, then all data is stored in the sqlite.db file. Therefore, it is enough to transfer only this file, provided that the database structure has not changed. You can also migrate the settins.ini file, which stores custom settings for displaying tabular data.


(11 replies, posted in General)

Each file must contain a begin - and section. With a dot at the end, this is very important!


The error was caused by the use of a Cyrillic character that is visually indistinguishable from the Latin


Thanks for the feedback, I'll fix it in the next version.

Well, I don’t know ... I downloaded the archive, unpacked it, launched it - everything works.There is a certainty that the matter is in different versions of the MVDB, but it is extremely small.

https://drive.google.com/file/d/1S2s0hZ … IELw4/view



(26 replies, posted in General)

sparrow wrote:

As for the event, apparently the program is waiting until the previous event is completed.
MouseLeave is also triggered after.
More correctly after MouseDown for the left button.

It turns out that onMouseDown suspends the processing of the events onMouseEnter and onMouseLeave. For me it was a shock, but there is certainly a logical explanation for this.



(11 replies, posted in General)

I forgot to say that modules do not limit the scope: all declarations (procedures, functions, variables and constants) are global.


(11 replies, posted in General)

There is no need to "call" anything in any special way. It is enough that you have specified an external file in the uses section.
When compiling the program, all scripts are collected into one final file script.dcu.

A little more difficult to deal with nesting. As I understand it, the MVDB tries to consistently check identifiers, and if an identifier is declared in a module, a link to which it has not yet managed to find, then there will be an error. Circular references are not allowed. The order in which references are declared is also important: independent modules must be declared first, and then modules that depend on previously declared ones.


(26 replies, posted in General)

Indeed, an interesting topic. And I also learned something interesting for myself: that the OnMouseEnter event when the mouse button is pressed comes after the OnMouseUp event.

Do not call me a bore, but I do not quite understand why the named priority statuses (Important-Urgent, Important-Not Urgent, Not Important-Urgent, Not Important-Not Urgent) give advantages over the numeric ones (1-2-3-4)? And why are four lists on the screen more convenient than one linear list? I agree that the proposed criteria for separation of concerns are convenient, but the visual representation seems to me debatable.

reteinformatica wrote:

HI k245, hi everyone,
I had a look at your project downloaded from the page you indicated. Unfortunately I can't see what it does in practice because I can't run it. When I run it I get this error: "Undeclared identifier 'labDesñription' at 311:25". And he puts my cursor at the 25:18 position basically a few spaces after the "end" command.
I thought that the identifier maybe should have been "labDscription" instead of "labDesñription" but I really don't know which file to find it on.

I checked both links, everything is downloaded, ClassExplorer starts (MultiLang is installed) and does not contain errors.



(11 replies, posted in General)

As you probably already know, My Visual Database allows you to place script sources in several files, which is very convenient if the number of lines of code exceeds a couple of thousand. In order to connect a module (a file with the .pas extension) to the main code, you must specify it in the uses:

   // sort by degree of dependency: first those that do not refer to anyone, then dependent
   'ConstVar.pas', // global constants and application variables
   'System\Utils.pas', // system procedures
   'Tools\Tools.pas', // tools
   'VClass\VClass.pas', // virtual classes and extensions
   'Forms\Forms.pas', // forms
   'UserApp.pas'; // general procedures and application functions

A prerequisite is that the module file is located inside the Script folder, nested storage of module files in subfolders is also allowed.

Unfortunately, the built-in MVDB editor does not support editing modules, but the solution was easily found in the person of the universal editor Notepad ++, which is used by many programmers. As you can see from the project file tree, there are quite a lot of them, and only six are present in the uses command. The remaining modules are connected in the modules described above, they also contain the uses command for files. For example, the Forms.pas file is used solely to register modules that store handlers.

Read more: https://k245.ru/en/mvdb-en/butterfly-effect.html

A couple of years ago, I even made a tool for localizing My Visual Database projects, but for some reason this topic was not particularly popular.


Hello! You may find the ideas on localization algorithms that I outlined in my article useful to you. In particular, there is an example of a localization system using text resource files. This solution does not require changing the program code when adding new interface objects for localization.


https://k245.ru/en/mvdb-en/resources-an … ation.html

When you add a new language, you only need a new text file with translated resources.

Анализируем модули


Хранение информации о проектах имеет далеко идущие цели: анализ исходного кода и архитектуры с выдачей рекомендаций по их оптимизации.

А начнем с простой задачи: извлечение информации о содержимом модуля, в частности – поиск и отображение процедур и функций.

Читать:  https://k245.ru/mvdb/analiziruem-moduli.html

Project modules


Typically, projects created in the My Visual Database development environment contain only one module with scripts – the script.pas file. However, if the program contains a lot of additional functionality, then the size of this file can be huge. Therefore, it is quite logical to divide the scripts into logical parts and store them in separate files.

The modular architecture improves the perception of the source text, allows you to reuse individual modules by copying the necessary files to a new project. Therefore, the next improvement of the Developer’s Guide is related to the display of the modular structure of projects.

Read: https://k245.ru/en/mvdb-en/project-modules.html