Topic: protect edit buttom with password
hi
how can I protect an Edit-Buttom with password or
how can I create a user database with different permission levels
please a short example
thanks
My Visual Database → Script → protect edit buttom with password
hi
how can I protect an Edit-Buttom with password or
how can I create a user database with different permission levels
please a short example
thanks
Hello,
Here you can download example, user with different permission levels
http://myvisualdatabase.com/forum/misc. … download=1
Also you can use script to protect edit button with a password
procedure Form1_Button1_OnClick (Sender: string; var Cancel: boolean);
begin
If InputBox('Caption', 'Enter password', '')<>'123' then Cancel := True;
end;
Hi,
thanks a lot.
I'm not a programmer, but I begin to understand the software and I think it is fantastic. and your rapid assistance in the forum, super! remains so. amazing, thank you.
ps: how to write our own script? please books reference
Hello Chiklopes
As MVD has been created from Delphi (RAD XE3), if you have some knowledge with Delphi language (Pascal), creations of script will be easy for you.
Otherwise, from numerous exemples delivered with MVD, you can read all differents scripts to have an idea how to write a script (simp;e or more complex).
Good luck with it !
YY
thanks yann.yvinec
Hello
I tried to use your script in the example real estate but it did not work .... what did I do wrong? could help me understand the script
thanks
________
function CheckDublicate (Action, sTable, sField, sValue: string; id: integer;): boolean;
var
s: string;
begin
result := False;
if Action = 'NewRecord' then
begin
s := SQLExecute ('SELECT Count(*) FROM '+sTable+' WHERE '+sField+' LIKE "' + sValue + '"');
if StrToInt(s) > 0 then result := True;
end;
if Action = 'ShowRecord' then
begin
s := SQLExecute ('SELECT Count(*) FROM '+sTable+' WHERE ('+sField+' LIKE "' + sValue + '") AND (id <> '+ IntToStr(id) +')');
if StrToInt(s) > 0 then result := True;
end;
end;
procedure frmRealestate_Button2_OnClick (Sender: string; var Cancel: boolean);
begin
if CheckDublicate(frmRealestate.dbAction, 'realestate', 'lastname', frmRealestate.edLastName.Text, frmRealestate.ButtonSave.dbGeneralTableId) AND
CheckDublicate(frmRealestate.dbAction, 'realestate', 'firstname', frmRealestate.edFirstName.Text, frmRealestate.ButtonSave.dbGeneralTableId) then
begin
ShowMessage('Person already exists.');
Cancel := True;
end;
end;
begin
end.
chiklopes
Please, send me your project to support@drive-software.com
I'll try to help you.
Dmitry,
I send you the project to your email
thanks
Hello Dmitriy
I receive your email.
many thanks
hello Dmitriy,
I sent you an email with the same project.
I made some changes to the file and it always gives me an error ... I need a little help how to solve it.
thank you
PS: have you other videos tutorial? it would be helpful.
chiklopes
Hello, answered to e-mail )
Unfortunately there is no other videos tutorial.
Hello Dmitriy,
I received your email
thanks for the prompt reply as always
My Visual Database → Script → protect edit buttom with password
Powered by PunBB, supported by Informer Technologies, Inc.
Theme Hydrogen by Kushi