STRU - Lists and modifies the structure of the dbfs files

You can share your experience with HMG. Share with some screenshots/project details so that others will also be benefited.

Moderator: Rathinagiri

Post Reply
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: STRU - Lists and modifies the structure of the dbfs file

Post by esgici »

Pablo César wrote:
esgici wrote:User defined conversion "processos" not working yet, is this correct ?
Ohh yes it is working !
Apparently I can't run it without translation :(

Saludos
Viva INTERNATIONAL HMG :D
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Re: STRU - Lists and modifies the structure of the dbfs file

Post by Pablo César »

Translations... just strings... ;) (I will start tomorrow, I promess to you dear Esgici !)
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: STRU - Lists and modifies the structure of the dbfs file

Post by esgici »

Pablo César wrote:Remember, you will need to make your own source code inside that EditBox and save your text with "Gravar" in menu item. Then you can "Salvar" just for apply modifications.
Sorry, after "Gravar" editbox, "Salvar" always left disabled :(
PROCESSOS.jpg
PROCESSOS.jpg (90.96 KiB) Viewed 4909 times
Viva INTERNATIONAL HMG :D
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: STRU - Lists and modifies the structure of the dbfs file

Post by esgici »

Pablo César wrote:Translations... just strings... ;) (I will start tomorrow, I promess to you dear Esgici !)
Please ...

I'm wondering really, how you will execute an User Defined Function at run time :o

Saludos
Viva INTERNATIONAL HMG :D
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

STRU - Lists and modifies the structure of the dbfs files

Post by Pablo César »

Esgici wrote:Sorry, after "Gravar" editbox, "Salvar" always left disabled
You so right, amigo Esgici. Even if no structure changing was made and any process has been changed, at least must allow for save "Salvar". Sorry was missing enabling "Salvar" button. Also was corrected a path+new name of dbf that is directly connected with the same name of prg which must compile & execute in runtime. Another think, when any changing is made (not structural) only data by processes, STRU should has not to be mention of any changing, so was needing to check structural of before and after saving.
Esgici wrote:I'm wondering really, how you will execute an User Defined Function at run time
Sorry, amigo was not detecting prg files then was not executing. Now it is working ! :oops:

This correction, are so important and delayed a little bit more (next week I will start) for translations demands.

Thank you Mr. Esgici for you observations. :)
Last edited by Pablo César on Sun Aug 26, 2012 7:40 pm, edited 1 time in total.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

STRU - Lists and modifies the structure of the dbfs files

Post by Pablo César »

Another bug was found by our colleague Jairo Maia at Clipper on line forum, that STRU does taking effects when decimals are changing. Also appointed that decimals must to be upto 8 as maximum range in the second Spinner. Now it is corrected, now in attached file.

Obrigado Jairo pela sua observação !

<Attached file removed, see last message with now release>
Last edited by Pablo César on Thu Aug 30, 2012 8:49 pm, edited 1 time in total.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

STRU - Lists and modifies the structure of the dbfs files

Post by Pablo César »

Esgici wrote:
Pablo César wrote:..."Clipper On Line" site
I did not almost anything understand from "Clipper On Line" forum because of language restriction
So it's impossible to know what features have it.
Just to clearify this question. To you amigo Esgici and for rest of fellow of this forum. Clipper on line placed in: http://www.pctoledo.com.br/forum/index.php is a brazilian forum for xBase language.
All of you can also post in: Portuguese, Spanish and English, there are also very good collegues very committed with xbase language (Clipper, Harbour, xHarbour, HMG, Minigui and other xbase tools). Of course that you will find all in portugues because is a Brazilian forum, but all will be very good wellcome !
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
Rathinagiri
Posts: 5480
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: STRU - Lists and modifies the structure of the dbfs file

Post by Rathinagiri »

Thanks a lot for the link. I hope it is useful for me too.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Re: STRU - Lists and modifies the structure of the dbfs file

Post by Pablo César »

You are always, wellcome friends !
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: STRU - Lists and modifies the structure of the dbfs file

Post by esgici »

Ola Pablo

A little function to determine memo file extension of current table ( including test prg) ...

A little contribution to your great work :)

I hope it will be useful :arrow:

Saludos

Code: Select all

#include "dbinfo.ch"

PROC Main()

   * Test .prg for MemFExtn() function
   
   SetMode( 25, 80 ) 
   CLS

   ? "Memo File extention :", MemFExtn()   // NIL
   ? REPL( "-", 80 )
   
   cTfName := "MFInTst1"
   aStruct := { { "FLD1", "C", 10, 0 } }
   
   DBCREATE( cTfName, aStruct ) 
   USE ( cTfName )
   
   ? "Memo File extention :", ">" + MemFExtn() + "<"   // ><
   ? REPL( "-", 80 )
   
   cTfName := "MFInTst2"
   aStruct := { { "FLD1", "M", 10, 0 } }
   DBCREATE( cTfName, aStruct ) 
   USE ( cTfName )
   ? "Memo File extention :", MemFExtn()   // .dbt
   ? REPL( "-", 80 )
   
   cTfName := "MFInTst3"
   aStruct := { { "FLD1", "M", 10, 0 } }
   DBCREATE( cTfName, aStruct, "DBFFPT" ) 
   USE ( cTfName )
   ? "Memo File extention :", MemFExtn()   // .fpt
   ? REPL( "-", 80 )
   
   ?
   WAIT "EOF MemFExtn.prg"
   
RETURN // MemFExtn.Main()

/*

    Function MemFExtn() -> Memo File Extention of current table
   
    Return : If current work area is empty : NIL 
             elseIf current table not include MEMO field : ""
             else .dbt / or .fpt depending RDD use in creation of current table.
            
    Required :
               #include "dbinfo.ch"

    Aug 2012
    
*/

FUNCTION MemFExtn()                       // Mem file extention

  LOCAL xRetVal
  
  IF !EMPTY( ALIAS() )
     IF DBINFO( DBI_MEMOHANDLE ) < 0
        xRetVal := ""
     ELSE      
        xRetVal := DBINFO( DBI_MEMOEXT ) 
     ENDIF   
  ENDIF !EMPTY( ALIAS() )
  
RETURN xRetVal // MemFExtn()  
Viva INTERNATIONAL HMG :D
Post Reply