Page 2 of 2
Re: MySql Primer
Posted: Sat Apr 04, 2009 1:02 pm
by sudip
Hello,
I "re-initialized" my MySql journey. I am still using TMySqlServer! Tried HbSqlRdd, but decided to try it later. Meanwhile I came to know another library HBTIP from Roberto Lopez. It's harder but more secure. So, I am now working with TMySqlServer.
Today I added Add, Modify and Delete options to my MySql project. I used Insert key for Add, Dbl Click for Edit and Delete key to delete records. Very simple and basic project. Taken help from Rathi's code and some Idea from Demo_2 example.

- mysql002.jpg (120.48 KiB) Viewed 4786 times
Thank you Roberto Lopez, Rathinagiri, Grigory Filatov, Esgici (Esgici your comments always inspire me

)
Please download it.
- Demo.zip
- (3.51 KiB) Downloaded 415 times
Then compile and run.
And please send your advice.
With best regards.
Sudip
Re: MySql Primer
Posted: Sat Apr 04, 2009 3:36 pm
by Rathinagiri
I had gone through your code and it is neat.
A small suggestion, perhaps not regarding MySQL.
Code: Select all
@ 20,120 TEXTBOX txtHostName ;
HEIGHT 25 ;
VALUE cHostName ;
WIDTH 120 ;
ON ENTER iif( !Empty(frmLogon.txtHostName.Value), frmLogon.txtUser.SetFocus, frmLogon.txtHostName.SetFocus )
@ 50,30 LABEL lblUser ;
VALUE "User" ;
WIDTH 120 ;
HEIGHT 35
@ 50,120 TEXTBOX txtUser ;
HEIGHT 25 ;
VALUE cUser ;
WIDTH 120 ;
ON ENTER iif( !Empty(frmLogon.txtUser.Value), frmLogon.txtPassword.SetFocus, frmLogon.txtuser.SetFocus )
@ 80,30 LABEL lblPassword ;
VALUE "Password" ;
WIDTH 120 ;
HEIGHT 35
@ 80,120 TEXTBOX txtPassword ;
VALUE cPassWord ;
PASSWORD ;
ON ENTER frmLogon.cmdLogin.SetFocus
IMHO, you need not give Setfocus command for every control, since the natural order of tab would be in the defined order of the controls. If you want to check the value, you can use 'valid' clause.
Re: MySql Primer
Posted: Sat Apr 04, 2009 4:07 pm
by sudip
rathinagiri wrote:I had gone through your code and it is neat.
A small suggestion, perhaps not regarding MySQL.
IMHO, you need not give Setfocus command for every control, since the natural order of tab would be in the defined order of the controls. If you want to check the value, you can use 'valid' clause.
Thank you Rathi for checking codes thoroughly and sending advice for improvement!!! I like it so much
This is the problem of Copy-Paste programming.

I copied that part (and slightly modified) from Demo_2!!!
With best regards.
Sudip
Re: MySql Primer
Posted: Mon Apr 06, 2009 5:20 am
by swapan
Great going Sudip!
Hope your this thread will be a great help for the members who want to give a try to MySQL - the free RDBMS!
Regards,
Swapan
Re: MySql Primer
Posted: Fri Feb 10, 2017 4:03 pm
by t57042
Hello Sudip,
trying to compile your code.
Get errormessage fro line : Value:=DATATOSQL(value): unknown function.
rgds
Richard
Re: MySql Primer
Posted: Fri Feb 10, 2017 4:22 pm
by serge_girard
Richard,
It will be something like this code:
Code: Select all
XDATUM = DTOC(XDATUM)
XDATUM = SUBSTR(XDATUM,7,4) + '-' + SUBSTR(XDATUM,4,2) + '-' + SUBSTR(XDATUM,1,2)
IF XDATUM = ' - - '
XDATUM = 'NULL'
ENDIF
RETURN (XDATUM)
Serge