[ Home ] [ Features ] [ Products ] [ FAQ's ] [ Screens ] [ Support ] [ Downloads ] [ About ] [ Discussion ]


the software that grows with you

 

V32Tb2Del()

Converts a Browser to a delimited text file.

Syntax

V32Tb2Del( <oBrowse>, <cFileDel> )

Arguments

oBrowse A browser object created with TbrowseNew() or TBrowseDB() classes.. Vouch32 will consider the oColumn:block to retrieve the data. So any kind of browser can be sumitted to this function for convertion into a database file.  
cFileDel A fully qualified file name with drive, path and extension to hold the resulting records.

Returns

Logical whether delemited file has been created or not.

Description

A handy function to convert a browser data into a delimited text file. Only the columns which are visible will be considered for inculsion. As this function does not take into account the underlying data structure, so every kind of browser becomes eleigible for delimited conversion

Records will be terminated with CR+LF pair and fields will be delimited with ',' separator. Fields will have the uneven length. Column values will be formatted as:

Character Fields ' " ' + eval( oColumn:block ) + ' " '
Numeric Fields ltrim( str( eval( oColumn:block ) ) )
Date Fields dtos ( eval( oColumn:block ) )
Logical Fields if( eval( oColumn:block ), 'T', 'F' )

Please note that the oBrowse:GoTop() will be issued at the completion of the process. So record pointer will not be at the place where it had been prior to issue the command. You can always press <ESC> to abort the process, but then the resulted databse will still retain the records upto the point <ESC> is pressed. 

Usage

lEnd := .f.

While !lEnd
      oBrowse:ForceStable()

       nKey = InKey( 0 )

       do case
       case nKey == K_ESC
            lEnd = .t.

       case nKey == K_ENTER
            lEnd := .t.

       case nKey == K_DOWN
            oBrowse:Down()

       case nKey == K_UP
             oBrowse:Up()

       case nKey == K_F10
              if V32Tb2Del( oBrowse,  cFileDel  )
                  //   Take some action 
              endif

       endcase 
End

Tips

 

 

[ Home ][ Features ] [ Products ][ About Us ][ FAQ's ][ Screen Shots ][ Downloads ][ Support ][ Discussion ]
.

Vouch is a Trademark of Pritpal Bedi
All other Trade Marks are the property of their respective owners.
Copyright 1993-2011 Pritpal Bedi. All rights reserved.
Hit Counter  
You are Visitor # since 14 May 2002