Such a filter works in conjunction with a button.

352

(6 replies, posted in Script)

sparrow wrote:

example Editmask

Perfect example.

amsjunior1,  I will add that you can use a mask to enter data, and store the data without formatting. To do this, the mask should be like this:

!\(00\) 0 0000-0000;0;_

In this case use the capabilities of the SQL тo display with formatting.

353

(6 replies, posted in Script)

Check your table view settings. Your SQL query is correct, returns text with formatting. Are you displaying a field named cf_celular in the table? Attach a project or a screenshot of the tabular display settings.

Надобно вам уточнить задачу. У вас есть запрос, который вы хотите отобразить в табличном представлении?
Если да, то вам понадобится кнопка с Action = SQL-запрос.


Форма эта?
http://myvisualdatabase.com/forum/misc.php?action=pun_attachment&item=9658&download=0
Для какого табличного представления это нужно сделать?

355

(1 replies, posted in General)

I think this article will be helpful

https://k245.ru/wp-content/uploads/2022/09/izobrazhenie_2022-09-18_133809731.png

https://k245.ru/en/mvdb-en/modular-licensing.html

356

(7 replies, posted in Russian)

dazzleqq wrote:

Ещё раз добрый день, возникла такая необходимость, чтобы при редактировании записи фильтр был бы пустым, т.е. отключен, а при создании новой записи,  фильтр был бы включен. Как реализовать?

Добавить обработчики на отображение и закрытие формы редактирования

procedure UD_REDACT_OnClose (Sender: TObject; Action: string);
begin
  UD_REDACT.ComboBox7.dbFilter := ''; // по умолчанию фильтр снят
  UD_REDACT.ComboBox7.dbUpdate;
end;

procedure UD_REDACT_OnShow (Sender: TObject; Action: string);
begin
  if Action='NewRecord' then // если добавление новой записи, то
  begin // добавить фильтр
    UD_REDACT.ComboBox7.dbFilter := 'id_LS_STATUS = 1';
    UD_REDACT.ComboBox7.dbUpdate;
  end;
end;

To use this DBMS, it is not necessary to run a web server. You can (and should) use a database server.
https://dev.mysql.com/downloads/mysql/
https://dev.mysql.com/img/banners/MySQLInstallerBannerV5.png

358

(35 replies, posted in General)

dhekabai wrote:

Hello. What is the difference between Lazarus and MVD? In screenshots the interface looks very similar and it seems they're both based on something called Delphi? Can someone explain?

The difference is that MVDB is a specialized environment optimized for creating a specific class of applications, namely: applications for working with databases MySQL and SQLite. It has a built-in report builder (FastReport) and database structure editor. And Lazarus is a universal development environment for any applications. As a result of these differences, development approaches and the speed of creating applications differ. In Lazarus, you can do everything, but slowly. In MVDB you can do fast, but only the above types of applications.


In a sense, MVDB is similar to Access - you can create data structures and forms to manage them.

359

(89 replies, posted in Russian)

malitos wrote:

А для закрытия окна предусмотрена возможность закрытия по нажатию клавиши Esc ? Или это скриптом ?

На форме ставите кнопку, настраиваете её на закрытие формы, при этом устанавливается свойство Cancel = True. Теперь такую форму можно закрыть по нажатии клавиши Ecs

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

mikhail_a wrote:

Есть таблица "Проекты", у которой есть поле "Статус проекта".
К этому полю привязана таблица "Статусы проекта".
На форме Проекты есть комбобокс "Статус проекта", который запускает SQL запрос, отображающий на форме проекты с выбранным в комбобоксе статусом.
Т.е. выбираем в комбобоксе какой то один статус и на форме отображаются проекты только с этим статусом.
Требуется построить отчет сразу по всем значениям комбобокса, т.е. чтобы в отчете было так:
Статус "Открытые"
Проект 1
Проект 4
Проект 8
Статус "Приостановленные"
Проект 2
Проект 3
Проект 9
Статус "В работе"
Проект 5
Проект 7
Что то не могу сообразить, каким образом решать эту задачу с помощью дизайнера отчетов. Посоветуйте, пожалуйста.

Выбираете все данные, а затем в самом шаблоне отчета настраиваете группировку данных по полю "Статус"

361

(7 replies, posted in Russian)

Результат:
http://myvisualdatabase.com/forum/misc.php?action=pun_attachment&item=9582&download=0

362

(7 replies, posted in Russian)

Решение:
http://myvisualdatabase.com/forum/misc.php?action=pun_attachment&item=9581&download=0

363

(8 replies, posted in Talks about all)

pavlenko.vladimir.v wrote:

Я что-то проморгал, на какой проект сбор. Вы все таки пишите среду разработки?

Теперь могу ответить на вопрос о разработке новой среды утвердительно:

https://k245.ru/mvm/mvm-nachalo.html

https://k245.ru/wp-content/uploads/2023/05/piramida.jpg

364

(35 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
https://k245.ru/wp-content/uploads/2023/05/Vybiraem-SUBD.jpg

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

366

(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.

Выбор СУБД

https://k245.ru/wp-content/uploads/2023/05/Vybiraem-SUBD.jpg

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


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

k245 wrote:

Production: Аccounting And Сontrol

https://k245.ru/wp-content/uploads/2022/08/Proizvodstvo.jpg


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

https://k245.ru/wp-content/uploads/2022/08/Pogranichnaya-zastava.jpg


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:

https://k245.ru/fr/mvdb-fr/un-economiseur-d-ecran.html

370

(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:

INITIAL SITUATION

Table name = A
Table field name A = 1

CHANGES

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.


const
  DB_TEXT_FIELD = 1;

procedure DB_AddField(ATableName: string; AFieldName:string; AType:integer );
// добавление поля
var
  tmpSQL:string;
begin
  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));
  end;
  end;
  DBT_MYSQL: RaiseException('DB_AddField - не поддерживается для типа базы DBT_MYSQL');
  end;
  SQLExecute(tmpSQL);
end;

function DB_FieldExists( ATableName: string; AFieldName:string ):boolean;
// проверяет существование таблицы
var
  tmpDataSet:TDataSet;
begin
  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
    begin
      if UpperCase( tmpDataSet.FieldByName('name').asString ) = UpperCase( AFieldName ) then
      begin
        Result := True;
        break;
      end;
      tmpDataSet.Next;
    end;
    tmpDataSet.Free;
  end;
  DBT_MYSQL: RaiseException('DB_TableExists - не поддерживается для типа базы DBT_MYSQL');
  end;
end;

function DB_TableExists( ATableName: string ):boolean;
// проверяет существование таблицы
begin
  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');
  end;
end;

Exaples:

  if not DB_TableExists('blank') then
  begin
    tmpSQL := //
      '  CREATE TABLE blank ( '+CR+//
      '    id     INTEGER PRIMARY KEY ASC AUTOINCREMENT, '+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+//
      '); ';
    SQLExecute(tmpSQL);
  end;

  if not DB_FieldExists( 'order', 'comment' ) then
    DB_AddField('order','comment',DB_TEXT_FIELD);

Cat in a bag

https://k245.ru/wp-content/uploads/2023/05/Kot-v-meshke.jpg


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

https://k245.ru/wp-content/uploads/2023/05/Analiziruj-eto.jpg


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

Кот в мешке

https://k245.ru/wp-content/uploads/2023/05/Kot-v-meshke.jpg


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


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

374

(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".

https://k245.ru/en/mvdb-en/your-projects.html

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

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

375

(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.