1 (edited by kees.krause 2020-11-23 13:21:03)

Topic: Mysql connect by script

See enclosed project (without .ddl and .exe) It works fine. I connect to mysql-server and next to MVd (admin/admin). Now I want to connect to mysql-server by script. I used the script as mentioned in "mysql.txt" but 1) I do not know if I am connected to the server  and 2) the loginform to MVD (admin/admin) does not appear. What am I doing wrong? Can please someone help me to get it working?

To MVD develepors (Dmitry): how can I translate menu "Change your own password" and translate the upcoming form.

Post's attachments

Attachment icon mvd_connect-script.zip 6.13 kb, 255 downloads since 2020-11-23 

Re: Mysql connect by script

Check this one.
http://myvisualdatabase.com/forum/viewtopic.php?id=1805

brian

Re: Mysql connect by script

Hallo Brian. I used thuis script. It dit not work. See my post.

Re: Mysql connect by script

kees.krause wrote:

Hallo Brian. I used thuis script. It dit not work. See my post.

Maybe you didn't comment unnecessary codes. Try to update your credential here. Credentials from mysql.txt can't connect to database.

Post's attachments

Attachment icon mvd_connect-script-updated.zip 497.73 kb, 283 downloads since 2020-11-23 

brian

Re: Mysql connect by script

Hello Brian, thanks very much for your contribution. In my ignorance I just copied the "connection script" to the existing script. I also changed: Form1.TableGrid1.dbUpdate. Now I can also see all records. Thanks again.

Hopefully my question to MVD develeptors (e.g.Dmitry): "how can I translate menu "Change your own password" and translate the upcoming forms", will be answered

6 (edited by brian.zaballa 2020-11-24 02:58:40)

Re: Mysql connect by script

kees.krause wrote:

Hello Brian, thanks very much for your contribution. In my ignorance I just copied the "connection script" to the existing script. I also changed: Form1.TableGrid1.dbUpdate. Now I can also see all records. Thanks again.

Hopefully my question to MVD develeptors (e.g.Dmitry): "how can I translate menu "Change your own password" and translate the upcoming forms", will be answered

You're welcome. Maybe this one is what you are looking for the "Change your own password".

Form1.mniChangePassword.Caption := 'Change password?';

As for the form after that, I have no luck to what is the form name. LMAO. The MVD developer/s can give you an answer to that.

brian

Re: Mysql connect by script

Does this help?


Login Form attributes.

Form = frmdbCoreLogin

Form Components:
Image1  = picture
bLogin  = login button
pnPassword =
edPassword = password edit box
pnLogin
edLogin = login edit box

frmdbCoreUserForm.ShowModal;
frmMain.mniChangePassword.click;
frmdbCoreUserChangePwd.show;
frmdbCoreUsers.ShowModal;
frmMain.mniUsers.click;

frmdbCoreLogin.Caption:=strCaption;  
 frmdbCoreLogin.Image1.Picture.LoadFromFile(ExtractFilePath(Application.ExeName)+'Images\logo.png');    //load custom image
 
 Application.User.id;
Application.User.Username;
Application.User.Email; 
Application.User.First_name; 
Application.User.Last_name; 
Application.User.Role; 
Application.User.RoleId; 
Application.User.is_admin; 
Application.User.is_active;
Application.User.is_logged; 
Application.User.Last_login; 
Application.User.Date_joined;
 
On a clear disk you can seek forever

8 (edited by brian.zaballa 2020-11-24 12:18:32)

Re: Mysql connect by script

That's nice CDB. From CDB's reply, I think I was able to get the component you are trying to change kees. Here, try this one.

// showmessage(frmdbCoreUserChangePassword.Components[0].Name);
frmdbCoreUserChangePassword.lbCurrentPassword.Caption := 'current:';
frmdbCoreUserChangePassword.lbNewPassword.Caption := 'new:';
frmdbCoreUserChangePassword.lbConfirmPassword.Caption := 'confirm:';
brian