wmic в помощь:


wmic diskdrive list
wmic logicaldisk get description,name


Алгоритм такой: вызываете консольную команду с выводом результата в файл, затем парсите файл результата.

Проект “Библиотека” v.1.0

https://k245.ru/wp-content/uploads/2023/08/bib1.jpg

Приложение с одной таблицей. Компоненты TAForm и TdbStringGridEx. Свойства Name, Top, Left, Width, Height, Sizeable, Editable, Settings, Anchors.

https://k245.ru/mvdb/proekt-biblioteka-v-1-0.html

328

(9 replies, posted in General)

jrga wrote:

I can work with views created in the database via script. Does anyone know if I can include a view, after being created in sqlite, in the "Database tables" tab of Myvisualdatabase. This would dramatically increase development on the MVD.

Theoretically, there should be no restrictions. To access views, do you use the button in SQL query mode? It would be easier if you added your project.

function IncYear(ADate:TDateTime; AValue:integer):TDateTime;
// изменить дату на нужное число лет
begin
  Result := IncMonth(ADate,AValue*12);
end;

В вашем проекте около 20 форм. Уточните, о каких формах (таблицах) идет речь?

331

(2 replies, posted in General)

Check out my project "Family Album". To speed things up, for each image, I create a thumbnail that is displayed in a grid. I use the tag system to search.


https://k245.ru/wp-content/uploads/2022/06/%D0%93%D0%B0%D0%BB%D0%B5%D1%80%D0%B5%D1%8F-2.png


https://k245.ru/en/mvdb-en/family-album.html

andrew wrote:

Я не знаток в таких тонкостях. Я новичок. Можете мне помочь, исправить ошибки, чтоб заработало? wink smile

Новички внимают советам, читают книжки и статьи с примерами, вникают в проблему, находят решения. А концепция "исправьте мне мои ошибки, чтобы заработало" подробно рассматривается в этой ветке форума: http://myvisualdatabase.com/forum/viewtopic.php?id=6262

333

(5 replies, posted in Russian)

А чем вас String то не устраивает? И как это связано с GUID?

UUID?

https://habr.com/ru/companies/vk/articles/522094/

tcoton wrote:

There is an open source version of FastReport now, any chance to see an ultimate version of MyVisualDatabase implementing it? https://github.com/FastReports/FastReport

Free Open Source Reporting tool for .NET6/.NET Core/.NET Framework that helps your application generate document-like reports.
No chance )))

QR codes work fine, look for errors in your project.

andrew, вам надо немного теорию реляционных баз данных подтянуть. Приход и расход должен содержать не названия, а ссылки на номенклатуру. А с практической точки зрения между приходом и расходом разница только в знаке операции. Опять же со временем потребуется аналитика, поэтому типовая структура БД для данной задачи такая:


Категория товара
- наименование


Номенклатура
- код
- наименование
- ссылка на категорию


Типы операций
- наименование
- флаг приход/расход


Склад (участок учета)
- наименование


Операции
- дата
- кол-во
- ссылка на тип операции
- ссылка на номенклатуру
- ссылка на склад


Всё остальное делается SQL-запросами ( через настройку кнопки или через настройку вычисляемых полей).


Почитайте для начала это: https://drive.google.com/drive/folders/ … nCQ3E0AfC2  стр.26 Реляционные базы данных.


Про SQL в MVDB - https://docs.google.com/document/d/1ovN … LvhtM/edit

338

(14 replies, posted in General)

Hello!

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

I did something similar, but as part of a workflow project. If anyone is interested, a description of the project and a link to the project itself is here: https://docs.google.com/document/d/1-GE … dcxnc/edit

Article in Russian (2021), if anyone is interested, I can translate the article and remaster the project.

andrew wrote:

кто-нибудь поможет???

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

340

(5 replies, posted in FAQ)

Красиво....

Пароли под звездочки спрятать - и годная тема )))

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

Попробую её прикрутить на стандартную форму авторизации, чтобы пользовать встроенные механизмы прав...

http://myvisualdatabase.com/forum/misc.php?action=pun_attachment&item=9728&download=0
Про принтеры - не знаю таких. Работают?

https://gigi.click/thumb.php?id=1322343

343

(18 replies, posted in General)

identity wrote:

thank you for your help
this is the sample with two different users. please check this one

Formulate your request correctly. Are you asking to write the script you need?


Do you still want to store passwords in a text file next to the program? They are not very safe in the SQLite database either, but here they just lie in plain sight and say "hack me"  )))

344

(18 replies, posted in General)

In your example, there is only one user. Do you happen to confuse program users and students in the database? These are two different concepts.


You can continue to store passwords and users in the initialization file (see example: login 1, password 333, login 2 password 123), but this is not a good solution.


Why don't you want to use the built-in rights management system?

345

(9 replies, posted in General)

There is no such possibility in MVDB. But there are tools that facilitate the creation of table views and editing forms based on the structure of the database.


According to my observations, automatic creation of forms only by the database data structure does not cover all the tasks that arise in real application development. One more level of abstractions is needed - data representations (views).


MVDB offers a combined form development technology that takes into account both the data structure and some representations. I mean calculated fields. But, unfortunately, their use can lead to a drop in performance. Therefore, it is possible to use a SQL query as a data source. But, unfortunately, not at the level of database design, but at the level of user interface implementation.

346

(4 replies, posted in Talks about all)

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

347

(4 replies, posted in Talks about all)

Je vous ai esquissé un exemple, il utilise les propriétés des tables et des boutons, ainsi qu'une requête de base de données qui récupère les informations textuelles souhaitées.

...

If you need to search on two fields at the same time, then insert the search condition directly into the SQL query that is used to select the data.

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

Pay attention to the settings
http://myvisualdatabase.com/forum/misc.php?action=pun_attachment&item=9666&download=0