Здравствуйте.


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


Также способ реализации зависит от многих других требований. Например необходим ли двухсторонний обмен? Под обменом подразумевается экспорт и импорт только новых записей и файлов? или при обновлении тоже необходима эта процедура?



В вашем случае логично было бы использовать клиент серверную СУБД MySQL.


Также не очень хорошая идея хранить файлы непосредственно в БД, но это зависит от размера файлов и их количества.


Чтобы вывести изображение из БД в отчет, не нужно какого либо дополнительного действия. Просто разместите в отчете компонент Picture object и присвойте его свойства DataSet = Report, DataField = название поля, в котором содержится изображение

You can attach your project (zip file without exe and dll) and describe what is your goal.

3,453

(13 replies, posted in General)

AD1408
I did an approximate algorithm of password meter, you can change the script to fix it.

3,454

(1 replies, posted in General)

Hello.


You found a bug.
Fixed, please download latest beta version
https://www.dropbox.com/s/4sb2tk75rauoj … b.zip?dl=0

3,455

(8 replies, posted in Database applications)

Hello.


You are right, again the bug.


Please download latest beta version, fixed:
https://www.dropbox.com/s/4sb2tk75rauoj … b.zip?dl=0

Form1.TableGrid1.dbFilter := '(Skotat.Mangd_Tall > 50) AND (Skotat.Plats = "' + Form1.Label1.Caption+'")';

Why you don't use button with action "Search"?

3,457

(2 replies, posted in Russian)

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

procedure Form1_Button1_OnClick (Sender: string; var Cancel: boolean);
begin
    Application.Minimize;
end;

Чтобы скрыть все кнопки, установите свойства формы
BorderStyle = bsSingle
BorderIcon > biSystemMenu = False




Также возможно вам понадобится предотвратить закрытие формы нажатием Alt+F4, для этого
установите свойство формы KeyPreview = True

и сделайте скрипт

procedure Form1_OnKeyDown (Sender: string; var Key: Word; Shift, Alt, Ctrl: boolean);
begin
    if (Alt) and (Key=115) then Key := 0;
end;

3,458

(13 replies, posted in General)

function StrengthMeter(sPassword: string): string;
var
    LowerCase, UpperCase, Numbers, Symbols: boolean;
    iLength, i: integer;
begin
    LowerCase := False;
    UpperCase := False;
    Numbers   := False;
    Symbols   := False;

    iLength := Length(sPassword);

    for i := 1 to iLength do
        if (ord(sPassword[i]) >= 97) and (ord(sPassword[i]) <= 122) then LowerCase := True;

    for i := 1 to iLength do
        if (ord(sPassword[i]) >= 65) and (ord(sPassword[i]) <= 90) then UpperCase := True;

    for i := 1 to iLength do
        if (ord(sPassword[i]) >= 48) and (ord(sPassword[i]) <= 57) then Numbers := True;

    for i := 1 to iLength do
        if not((ord(sPassword[i]) >= 97) and (ord(sPassword[i]) <= 122)) and
           not((ord(sPassword[i]) >= 65) and (ord(sPassword[i]) <= 90)) and
           not((ord(sPassword[i]) >= 48) and (ord(sPassword[i]) <= 57)) then Symbols := True;


    if iLength <= 4 then result := 'Very weak';

    if (iLength >=5) and (iLength <=6) then
    begin
        if LowerCase and UpperCase and Numbers and Symbols then result := 'Medium'
        else if LowerCase and UpperCase and Numbers then result := 'Weak'
        else if LowerCase and UpperCase then result := 'Weak'
        else result := 'Very weak';
    end;

    if (iLength >=7) and (iLength <=8) then
    begin
        if LowerCase and UpperCase and Numbers and Symbols then result := 'Strong'
        else if LowerCase and UpperCase and Numbers then result := 'Medium'
        else if LowerCase and UpperCase then result := 'Weak'
        else result := 'Weak';
    end;

    if (iLength >=9) and (iLength <=10) then
    begin
        if LowerCase and UpperCase and Numbers and Symbols then result := 'Very Strong'
        else if LowerCase and UpperCase and Numbers then result := 'Strong'
        else if LowerCase and UpperCase then result := 'Medium'
        else result := 'Medium';
    end;

    if (iLength >=11) and (iLength <=13) then
    begin
        if LowerCase and UpperCase and Numbers and Symbols then result := 'Very Strong'
        else if LowerCase and UpperCase and Numbers then result := 'Very Strong'
        else if LowerCase and UpperCase then result := 'Strong'
        else result := 'Strong';
    end;

    if (iLength >=14) then result := 'Very Strong'

end;


procedure Form1_Edit1_OnChange (Sender: string);
begin
    Form1.Label1.Caption := StrengthMeter(Form1.Edit1.Text);
end;


Project:

3,459

(13 replies, posted in General)

Do you mean something like this:
https://www.my1login.com/resources/pass … ngth-test/


Or you want just to see how many characters in a password?

3,460

(9 replies, posted in General)

Try to add more line breaks:

 procedure Form1_GridEmployees_OnChange (Sender: string);
var
    i, c: integer;
begin
    Form1.GridEmployees.Columns[0].Padding := 10;
    Form1.GridEmployees.Columns[1].Padding := 10;
    Form1.GridEmployees.Columns[2].Padding := 10;
    Form1.GridEmployees.Columns[3].Padding := 10;

    Form1.GridEmployees.Options := Form1.GridEmployees.Options or goRowResizing;

    c := Form1.GridEmployees.Columns.Count - 1;
    for i := 0 to c do
    begin
        Form1.GridEmployees.Columns[i].VerticalAlignment := taAlignTop;
        Form1.GridEmployees.Columns[i].WrapKind := wkWordWrap;
    end;

    c := Form1.GridEmployees.RowCount - 1;
    for i := 0 to c do
    begin                             
        Form1.GridEmployees.Cells[0,i] := Form1.GridEmployees.Cells[0,i]+#10#13#10#13#10#13#10#13;
        Form1.GridEmployees.Cells[1,i] := Form1.GridEmployees.Cells[1,i]+#10#13#10#13#10#13#10#13;
        Form1.GridEmployees.Cells[2,i] := Form1.GridEmployees.Cells[2,i]+#10#13#10#13#10#13#10#13;
        Form1.GridEmployees.BestFitRow(i);
    end;
end;

Why do you compare name of a Form and caption of a Label? What exactly you want to do?

3,462

(4 replies, posted in General)

Unfortunately it can't be fixed in the old version.

3,463

(4 replies, posted in General)

Hello.


You found a bug, fixed, thanks.


Please download latest beta version
https://www.dropbox.com/s/4sb2tk75rauoj … b.zip?dl=0


Open your project using latest version and open settings of CURRENCY field to add space after euro symbol.


Thanks.

3,464

(8 replies, posted in Database applications)

tbo
It's just bug of the old version, please download latest version then open this project using My Visual Database.

3,465

(2 replies, posted in Script)

Hello.


procedure Form1_ComboBox1_OnCloseUp (Sender: string);
begin
   Form1.TableGrid1.dbFilter := 'Testa_Nr = "' + Form1.Edit1.Text+'"';
   Form1.TableGrid1.dbUpdate;
end;

My Visual Database use standard Windows components for the interface. For Windows Vista and above, these properties like Color and Font color was disabled by operation system.

3,467

(9 replies, posted in General)

AD1408
Check it

        Form1.GridEmployees.Cells[0,i] :=Form1.GridEmployees.Cells[0,i]+#10#13;
        Form1.GridEmployees.Cells[1,i] :=Form1.GridEmployees.Cells[1,i]+#10#13;
        Form1.GridEmployees.Cells[2,i] := Form1.GridEmployees.Cells[2,i]+#10#13;

3,468

(9 replies, posted in General)

Check it out

procedure Form1_GridEmployees_OnChange (Sender: string);
var
    i, c: integer;
begin
    Form1.GridEmployees.Columns[0].Padding := 10;
    Form1.GridEmployees.Columns[1].Padding := 10;
    Form1.GridEmployees.Columns[2].Padding := 10;
    Form1.GridEmployees.Options := Form1.GridEmployees.Options or goRowResizing;

    c := Form1.GridEmployees.Columns.Count - 1;
    for i := 0 to c do
    begin
        Form1.GridEmployees.Columns[i].VerticalAlignment := taAlignTop;
        Form1.GridEmployees.Columns[i].WrapKind := wkWordWrap;
    end;

    c := Form1.GridEmployees.RowCount - 1;
    for i := 0 to c do
    begin
        Form1.GridEmployees.Cells[0,i] := #10#13+Form1.GridEmployees.Cells[0,i]+#10#13;
        Form1.GridEmployees.Cells[1,i] := #10#13+Form1.GridEmployees.Cells[1,i]+#10#13;
        Form1.GridEmployees.Cells[2,i] := #10#13+Form1.GridEmployees.Cells[2,i]+#10#13;
        Form1.GridEmployees.BestFitRow(i);
    end;
end;

3,469

(9 replies, posted in Russian)

gpkuklin
К сожалению все так, как и любая другая программа обладает своими приемуществами и недостатками.


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

Здравствуйте.


Действительно кнопка с действием Отчет игнорировала значения выбранные в ComboBox при использовании опции MultiSelect, исправил. Скачайте пожалуйста последнюю бета версию:
https://www.dropbox.com/s/4sb2tk75rauoj … b.zip?dl=0


Также в новой версии есть изменения, из за которых необходимо будет немного поправить шаблоны отчета.
Теперь для формирования имен полей в отчете используется и имя таблицы базы данных. Т.е. было
fieldname, а теперь tablename.fieldname. Вам необходимо заново расположить поля в отчете либо отредактировать их.


Поправил отчет на форме finansy_otchet, чтобы работал в новой версии.
Исправленный проект:
https://www.dropbox.com/s/oqa75j6zmipbe … d.zip?dl=0

3,471

(2 replies, posted in General)

Hello.


If you made some changes in your project (without changes of database structure), you can send these files to apply these changes on user machine:

-script.dcu
-forms.xml



If you want update MVD version of project, just send exe file.

3,472

(1 replies, posted in General)

Hello.


Check it out
https://www.dropbox.com/s/a95jl810ve2g3 … d.zip?dl=0

3,473

(2 replies, posted in General)

Hello.


This is bad idea to store large files in a database.


Now you should save all stored files from the database then delete them from database. After that you can make procedure VACUUM.


like this

procedure Form1_Button1_OnClick (Sender: string; var Cancel: boolean);
begin
   SQLExecute('VACUUM');
end;

Finally you can save all file again, using method LinkFile.



If you have a lot of files, you can write a script, using procedure SaveFileFromDataBase to save files from database, then save them back using SQL query (UPDATE TABLE)

3,474

(2 replies, posted in Reports)

Hello.

An example for you:

3,475

(9 replies, posted in General)

AD1408 wrote:

Thank you very much Dmitry...............


What about remaining two sides (top and bottom) of cells - Rows?

Unfortunately there is no a property for vertical padding.