Topic: Different Passwords, Different Projects

Hi
explaining this problem is going to be difficult.
in the attached sample I have 3 different users for 3 different programs.
What I need to do is that when You enter the correct password for user 1, then Button1 is clicked automatically
another approach that also works for me is:
when You enter the correct password for user 1, then Button2 and Button 3 should be disabled and only Button1 is enabled.

Post's attachments

Attachment icon User.rar 516.57 kb, 79 downloads since 2023-07-17 

Re: Different Passwords, Different Projects

http://myvisualdatabase.com/forum/viewtopic.php?id=1060

Re: Different Passwords, Different Projects

Thanks pavlenko.vladimir.v but that's not what I had in mind at all. the topic that you referred me to, is for just one project with different users.
let me pose the question once again:
there are 3 different MVDB projects (not users) and I want to connect them together using a form. as you can see 3 buttons in the login form are hidden , and I just need the button is clicked automatically when you enter the correct password for each project or the button is enabled  when you enter the correct password.

Re: Different Passwords, Different Projects

Is there a reason why you can't just use the role based access controls that are provided as standard with MVD (see attachment)?
Users and passwords are the same.
Derek.

Post's attachments

Attachment icon User.zip 547.97 kb, 96 downloads since 2023-07-18 

Re: Different Passwords, Different Projects

lots of thanks Derek for the great tip
it helped me a lot with my project

Re: Different Passwords, Different Projects

Hi
Using the role based, I encountered a problem.
It arises when I want to change the user or in this case change between the applications.
How can I reset user (close the current form and show frmdbcoreLogin) ?

Re: Different Passwords, Different Projects

You can switch from one application (or Form in the attached example) to another by using role-based access (as described earlier).
In the attachment, the following is enabled through roles
User   Application (Form)
1         1
2         2
3         3
4         1, 2
5         1, 3
6         2, 3
7         1, 2, 3
Admin 1, 2, 3 + access to create / change users
In all cases, the userid and the password are the same.
To change user, simply add a button that re-opens the application.
Derek.

Post's attachments

Attachment icon roles.zip 336.98 kb, 81 downloads since 2023-07-20 

Re: Different Passwords, Different Projects

Small change to my earlier post so you can see the currently logged on user.
D.

Post's attachments

Attachment icon roles.zip 337.31 kb, 123 downloads since 2023-07-20 

9 (edited by brian.zaballa 2024-02-23 12:35:07)

Re: Different Passwords, Different Projects

Good day everyone. bumped to this post when I'm looking for something.
Reopening the application helps me a lot, especially when restoring sqlite database from backup, You can replace the database by simply closing the main form then reopen the application. I just run into some problem with specifying the exe name in OpenFile. Well, my mistake by simply reusing code or renaming the application, then not changing this line of code. To address this, maybe someone will encounter that problem, you can change it by Application.ExeName. this will get the absolute path of the executable and you can reuse the code without worrying,

// close the form
Form0.Close

// Replace database here

// Reopen file
// openfile('roles.exe'); 
OpenFile(Application.ExeName);
brian