🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.vdbase.data.sql
Article #471

Re: packtable

#471
From: Gary Gary White
Date: Thu, 03 Dec 1998 00:00
40 lines
1607 bytes
On Thu, 3 Dec 1998 16:36:32 -0600, John Staub wrote:

> I am using the following code (OODML I hope<g>) to open a new database, get
> some info from the table, do some other stuff, then delete all the records
> in the table, pack it, and then press on:
> ---snip snip
>       local oExcel, oRange,cText, q,r,i,nRow,d
>       d = new database()
>       d.databasename = "CERTLOCAL"
>       d.active = true
>       store 0 to oExcel,oRange,q,r,i,nRow
>       q := new query()

q.database = d

>       q.sql = "select * from temp"
>       q.active = true
> >> do some stuff with Excel here <<
> >> finished so let's dump all the records from temp.dbf and clean it up<<
> 
> >> this line works      delete from temp.dbf //mark all records for removal

// you can use this to delete and pack in one step
d.emptytable("TEMP)

q.active = false

// or pack the table before you close the database
d.packtable("TEMP")

>       d.active = false
// not the d.close() is not necessary.  Setting active=false does it.

>       return


Gary

Some dBASE Stuff at
http://www.AppTools.com/dbase
Technical Details
Message-ID: <366718a7.17289771@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <7473mr$t6t22@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: ff5a1,4b4340483d0eb119
X-Google-Attributes: gidff5a1,public
From: Gary (Gary White)
Subject: Re: packtable
Date: 1998/12/03
Message-ID: <366718a7.17289771@forums.borland.com>
X-Deja-AN: 418405492
Content-Transfer-Encoding: 7bit
References: <7473mr$t6t22@forums.borland.com>
Content-Type: text/plain; charset=us-ascii
Organization: Just Me
Mime-Version: 1.0
Reply-To: Gary
Newsgroups: borland.public.vdbase.data.sql