I am using this code in my Vb.Net application to add some empty rows in a worksheet:
Dim TPAGECOUNT = WKSHEET.PageSetup.Pages.Count
Do While TPAGECOUNT = WKSHEET.PageSetup.Pages.Count
WKSHEET.Range("A" & TROW & ":R" & TROW).Rows.Insert(Shift:=EXCEL.XlInsertShiftDirection.xlShiftDown)
TROW =...
You can lock and Unlock the files by opening the files in Binary Mode and change some first two/three byte information.
By changing this information, the database cannot be accessed. To access the database you have to restore the old information. These bytes are common to all files and you can...
I think u want to create temporary work files.
TEMPPRN := "TEMP"+SUBSTR(TIME(),7,2)+SUBSTR(TIME(),4,2)+".PRN"
TEMPDBF := "TEMP"+SUBSTR(TIME(),7,2)+SUBSTR(TIME(),4,2)+".DBF"
This is useful to create unique file names in a network environment.
S.Durai.
Here is a small coding the LOCK/OPEN DBF files in Current Directory.
#INCLUDE "FILEIO.CH"
DECLARE AFILES[ADIR("*.DBF")]
CLEAR SCREEN
TFLAG = .T.
@5,5 SAY 'OPEN FILES: ' GET TFLAG PICT 'Y'
READ
IF LASTKEY() = 27
RETURN
ENDIF
ADIR("*.DBF",AFILES)
FOR I= 1 TO...
I Think I have not given the coding for what you really want.
Here I have shown you the coding, which I use for Packing the Databases with
its index files.
PROCEDURE PACKDBF()
SELE A
USE INDEACC SHARED
INDEX ON DATABASE TO (TEMPNTX)
DO WHILE !EOF()
SELE A
TDB = A->DATABASE
TNTX = ''
DO...
Here is my coding and the DBF i used is INDEACC.DBF
STRUCTURE:
DATABASE C 11
INDEXFLD C 40
INDEXFILE C 11
FORCOND C 40
PROCEDURE NDXER
PRIVATE NSTART,NEND,NTIME
STORE 0 TO RANGE,I
NSTART=SECONDS()
SELE A
USE INDEACC SHARED
GO TOP
MEN = 5
@11,45,21,72 BOX SPACE(9)
@11,45 TO 21,72 DOUBLE...
You better have a database having the name of the databases and its related index file names and the index keys and conditions if any.
By using a small program u can select the index file names to a string and use SET INDEX TO &cstring
I have used this, and if u want i can send u the coding...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.