Bill,
That looks like it should be a great help. The Foxpro stuff doesn't mean
much to me, but I'll pass it on to the Foxpro programmer from the company
I'm working for.
There's a Tag in Nate's Tag gallery call CF_Waitfor which will wait for
certain condition's to be true before continuing.
When (if) I get the database packed, I can trigger one of said conditions.

Can I get back to you if I need any further assistance? In the meantime,
enjoy the vacation.

Regards
Michael O'Reilly
Analyst Programmer
TransAer
 

-----Original Message-----
From: Bill Grover [mailto:[EMAIL PROTECTED]]
Sent: 16 May 2000 19:26
To: [EMAIL PROTECTED]
Subject: RE: Boolean fields in Foxpro


I don't see why not.  To be honest I've never tried to execute an external 
application from CF.  One item I'm not sure of is if CF will wait for the 
application to finish.  If it does then I'd run with it.

Another way to accomplish this that should work as well would be to do the 
following.

1.  Create a FoxPro program that ends up being a COM object.
2.  In CF use the CFLock.
3.  Create your object using CFOBJECT
4.  Call a method on the object that does the pack.
5.  Release the object
6.  Release the CFLock.

The following code snippet should give you the basics of the COM object 
code.  This snippet needs to be placed in a program (.prg) and set as the 
main program of your project.  Then build your project when building the 
project you need to tell it to create a Win32 executeable/COM Server.  Also 
tell it to Regenerate Component ID's.  I've had my best success with FoxPro 
COM objects this way.

DEFINE CLASS MyPack AS custom OLEPUBLIC

PROCEDURE DoPack
*
* Here is where the code goes to pack your database
*
         OPEN DATABASE myDatabase                && Open your database

         SELECT 0                                && Select the next 
available workspace
         USE table1 EXCLUSIVE                    && Open your table, it 
will become the selected table.
         PACK                                    && Pack the table just
opened
         USE                                     && Close the table just 
packed.

         SELECT 0                                && Select the next 
available workspace.
         USE table2 EXCLUSIVE                    && Open your table, it 
will become the selected table.
         PACK                                    && Pack the table just
opened.
         USE                                     && Close the table just 
packed.

         RETURN

ENDPROC

ENDDEFINE

Let me know if I can be of any more help.

Bill Grover
Supervisor, IS
EU Services, Inc.
649 N Horners Ln
Rockville MD 20850

Phone:  301-424-3300 x396
FAX:    301-424-3300 x1396#
E-Mail: [EMAIL PROTECTED]

At 12:15 PM 5/16/2000 +0000, you wrote:

>Date: Tue, 16 May 2000 09:21:19 +0100
>From: Michael O Reilly <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: RE: Boolean fields in Foxpro
>Message-ID: <ECE6504EA487D3118D8A00805F59102E7EB2D1@NT_BACKUP>
>
>Bill,
>Don't worry about speed of reply's. I find that I don't have time to read
>even a quarter of the stuff on this list. I wouldn't expect somebody to use
>their vacation time to reply to post's.
>Any reply's I receive are a bonus.
>Anyway Foxpro.
>I discovered last night the issue about requiring exclusive use of the DB
to
>perform a PACK.
>I records marked as deleted are not retrieved by SQL queries but they stay
>in the DB.
>I reckon some of the tables were planning to use will get pretty large so I
>had to get rid of these redundant records.
>
>Could I schedule a template to run at Midnight on Sunday which perform's a
>CFLock and then executes an external app which pack's the DB?
>
>Regards
>Michael O'Reilly
>Analyst Programmer
>TransAer

----------------------------------------------------------------------------
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to