Article View: borland.public.vdbase.data.sql
Article #472Re: packtable
From: John Staub
Date: Thu, 03 Dec 1998 00:00
Date: Thu, 03 Dec 1998 00:00
61 lines
2167 bytes
2167 bytes
Gary,
q.database = d
q.active = false
Damn, I knew I was missing something<g>. I had the d.close() in there
in an attempt to work through it.
Once again, you came through. My thanks.
John
Gary White wrote:
>
> 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
--
John Staub
Staub & Associates, Inc.
(850) 913-8488
http://www.staubassociates.com
Buy your books online at
http://www.staubassociates.com/bkstore.htm
Technical Details
Message-ID:
<366724B7.A5FC2572@worldnet.att.net>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<7473mr$t6t22@forums.borland.com> <366718a7.17289771@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: John Staub <bmds@worldnet.att.net> Subject: Re: packtable Date: 1998/12/03 Message-ID: <366724B7.A5FC2572@worldnet.att.net> X-Deja-AN: 418421869 Content-Transfer-Encoding: 7bit References: <7473mr$t6t22@forums.borland.com> <366718a7.17289771@forums.borland.com> Content-Type: text/plain; charset=us-ascii Organization: Staub & Associates, Inc. Mime-Version: 1.0 Reply-To: bmds@worldnet.att.net Newsgroups: borland.public.vdbase.data.sql