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.
Thank you Roberto Lopez, Rathinagiri, Grigory Filatov, Esgici (Esgici your comments always inspire me )
Please download it.
Then compile and run.
And please send your advice.
With best regards.
Sudip
MySql Primer
Moderator: Rathinagiri
Re: MySql Primer
With best regards,
Sudip
Sudip
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: MySql Primer
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.
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
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
Re: MySql Primer
Thank you Rathi for checking codes thoroughly and sending advice for improvement!!! I like it so muchrathinagiri 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.
This is the problem of Copy-Paste programming. I copied that part (and slightly modified) from Demo_2!!!
With best regards.
Sudip
With best regards,
Sudip
Sudip
Re: MySql Primer
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
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
Hello Sudip,
trying to compile your code.
Get errormessage fro line : Value:=DATATOSQL(value): unknown function.
rgds
Richard
trying to compile your code.
Get errormessage fro line : Value:=DATATOSQL(value): unknown function.
rgds
Richard
- serge_girard
- Posts: 3176
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: MySql Primer
Richard,
It will be something like this code:
Serge
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)
There's nothing you can do that can't be done...