Posts

How to Add Object button in VFP _Screen Desktop

Image
Public oHandler oHandler = Newobject ("ClickHandler") WITH _SCREEN _SCREEN.Caption='SHOW BUTTON IN VFP DESKTOP SCREEN' .ADDOBJECT("command1","commandbutton") Bindevent (.COMMAND1, "Click", oHandler, "Build") WITH .COMMAND1 .Top = 80 .Left = 10 .Height = 48 .Width = 228 .FontBold = .T. .FontSize = 12 .Caption = "SHOW BUTTON 1" .SpecialEffect = 0 .BackColor = RGB(255,88,9) .Themes = .T. .Name = "Command1" .VISIBLE=.T. ENDWITH .ADDOBJECT("command2","commandbutton") Bindevent (.COMMAND2, "Click", oHandler, "Build1") WITH .COMMAND2 .Top = 150 .Left = 10 .Height = 48 .Width = 228 .FontBold = .T. .FontSize = 12 .Caption = "SHOW BUTTON 2" .SpecialEffect = 0 .BackColor = RGB(255,88,9) .Themes = .T. .Name = "Command2" .VISIBLE=.T. ENDWITH ENDWITH *---------------------------------------- Define Class...

How to Recovery MySQL database if you only have Folder Frm, Ibdata1, ib_logfile0, ib_logfile1

Are you have trouble to open database MySQL here i will show you in 4 step : 1. First Backup your database folder make sure you have 3 file and 1 folder frm(database name) or 2 folder or have more folder frm backup all (remember) - ibdata1 - ib_logfile0 - ib_logfile1 - Folder database frm 2. see what trouble you have - Access denied for user 'root'@'localhost'(using password:YES) if you try and try reinstall mysql but security not apply answer: - delete folder mysql in folder data - reinstall mysql - copy all folder frm and 3 file ibdata1,ib_logfile0,ib_logfile1 3. you should try to open database, and if you can open your database enjoy. 4. If you still can't open your database please send me email elchansoft88@gmail.com i will help you as soon as possible

Turn on MySQL query cache to speed up query performance?

As we know, speed is always the most important element in developing a website especially for those high traffic database driven website. You can try to turn on query cache to speed up query. To speed up query, enable the MySQL query cache, before that you need to set few variables in mysql configuration file (usually is my.cnf or my.ini) - 1st, set query_cache_type to 1. (There are 3 possible settings: 0 (disable / off), 1 (enable / on) and 2 (on demand). query_cache_type = 1 - 2nd, set query_cache_size to your expected size. I’d prefer to set it at 20MB. query_cache_size = 20M If you set your query_cache_type = 2 ( on demand ), you would wan to modify your sql query to support cache. SELECT SQL_CACHE field1, field2 FROM table1 WHERE field3 = ‘yes’ To check if your mysql server already enable query cache, simply run this query:- SHOW VARIABLES LIKE ‘%query_cache%’; You will see this result:- +——————-+————————————————————————+ | Variable_name | Value | +——————-+———————————————...

How to Create MySQL Store Procedure in Navicat

Example: BEGIN SELECT * FROM CITY WHERE CITY_NME=NAME; END Save Store Procedure with TEST name ***** In Paramter Textbox fill with NAME CHAR(20) click run an entry "BATAM" or what ever CITY name the query should be display with city fill **************** now how to call within VFP **************** Here an example: MYSTS = "CALL TEST('BATAM')" SQLEXEC(1, MYSTS, "MYCURSOR") SELECT MYCURSOR BROWSE

Installing IIS - Cannot find STAXMEM.DL_

Ahhh, IIS, gotta love it. Nothing can ever be easy. So, as I am trying to install IIS on my Dell that I just reformatted, I get this: Cannot find the file STAXMEM.DL_ in my C:\i386 dir. hmm…. well, after a little looking, if you run this command esentutl /p %windir%\security\database\secedit.sdb If you then retry the install, it should work

Fix Generic Host For Win32 and Svchost.exe Error

Now we no longer have to worry about “Generic Host for Win32 Process” and “svchost.exe” errors that haunt our Windows XP almost daily (If not cured). Below i will explain what are the symptoms of this evil problem and how easily it can be fixed: Symptoms: You are surfing the internet or are engaged any type of Internet activity when suddenly all your Network activity goes to hault. You can still see the Internet connected icon in the tray but you cannot surf, browse or do anything. You get an error message something like “Generic Host Process for Win32 Services has encountered a problem and needs to close. We are sorry for the inconvenience.” Error message reporting about faulting netapi32.dll and svchost.exe. You try to disconnect your Internet because of no activity observed but the Internet icon wont disappear. You recieve an error message something like “Your PC has recovered from a serious problem” etc. Solution: Follow these simple steps and your Windows will be fully cured of t...

How to Change MySQL Default Data Folder to another Folder

Today a client wanted to move his MySQL database to second hard disk. Moving MySQL database to its own hard disk improve IO performance as the hard disk only need to serve MySQL data, nothing OS related. This was a cpanel server, so start with stoping chkservd, so mysql or httpd will not start while i copy the files. First created a copy of MySQL database on second hard disk, which is mounted as /backup rsync -vrplogDtH /var/lib/mysql /backup/ Now stop chkservd, mysql and apache service chkservd stop service mysql stop service httpd stop Wait few minutes and run rsync again to update the database rsync -vrplogDtH /var/lib/mysql /backup/ We have now MySQL database copied to /backup/mysql folder. Rename orginal MySQL data files with mv /var/lib/mysql /var/lib/mysql_old Now edit /etc/my.cnf vi /etc/my.cnf You need to add following line datadir = /backup/mysql To start of the file. If datadir already set, you need to change path. Everything is finished, just restart mysql, apache and check...