According to the MiniGUI Help File, a Browse control is a general purpose database browser.
while a control Grid is a container object that displays data in rows and columns, and is similar in appearance to a Browse window.
Q1. So, what are the differences ?
Q2. When to use BROWSE ?
Q3. When to use GRID ?
Sudip :
Q4. For browse control (for data editing), do we need to use table "EXCLUSIVELY" ?
Answers
1. Rathinagiri (HMG Forum) :
1.1 Browse controls are always linked with one table (that too a .dbf table).
1.2 Grid controls are for used for other purposes where, you wish to represent data in row,col format. For example, it may show a two dimensional array!
1.3 All the browse controls are grid controls but not vice versa.
2. MOL aka Malek, Poland (HMG Forum)
2.1 I think you will have problems with browsing huge tables (exhausting memory, etc) while using grid. Using Browse, I didn't found problems with database which has 100MB.
2.2 You need to open table in exclusive mode only when you want to add records or edit record via ALT-A, ALT-E.
2.3 If you open table in shared mode, you must write your own function to add, edit or delete rows.
2.4 WORKAREA property of Browse is available at control definition only.
3. Sudip, Kolkata, West Bengal India
3. 1 I just found a big difference in Grid and Browse in MiniGUI extended!
If you use SET AUTOADJUST ON. Then Grid will be auto adjusted, but normal Browse (not tsbrowse) will not! :)
3.2 As per help file (hmg_hlp.chm), we can set WORKAREA during definition of browse only! Cannot change on the fly!
3. Bicahi Esgici, HMG Forum, Turkey
Hi to all Clipper and especially HMG fans

I want give a humble answer to an unanswered question in Saturday, March 21, 2009 post HMG; Grid versus Browse;
Sudip ;
Q4. For browse control (for data editing), do we need to use table "EXCLUSIVELY" ?
A4. No. If your application will run in a single machine this doesn’t matter. In a network environment you can’t open your files exclusively. If so, only one user (who come first) can use your application. Than, you MUST use SHARED mode. BTW you don’t need specify SHARED mode option every open (USE); setting globally EXCLUSIVE OFF is sufficient.
When a file open by shared, editing need some considerations. Under Browse or not, you have LOCK every record before and UNLOCK after edit ( changing record pointer also issue an UNLOCK). LOCK ( .T.) property of BROWSE successfully achieve this duty for you.
While a BROWSE active, ALT-A allow row appending to table. This is only issued an APPEND BLANK command. This command automatically LOCK new appended (empty) record. So, doesn’t require any precaution.
Precaution required for operations intended multiple records, such as PACK, ZAP, APPEND FROM, DELETE FOR ... / ALL, RECALL FOR ... / ALL, REPLACE FOR ... / ALL, UPDATE ON ...
The best way for such operations is "close" application to network ( all user ) and performing on a single machine. Another way is using FLOCK() for a limited time.
I hope that this answer will be useful.
Regards and happy HMG’ing

Hi CCH,
ReplyDeleteThanks for the topics. We really need it!
I just found a big difference in Grid and Browse in MiniGUI extended!
If you use
SET AUTOADJUST ON
Then Grid will be auto adjusted, but normal Browse (not tsbrowse) will not! :)
Regards.
Sudip