Re: how closing open dbf file?



IMO, there would be no disadvantage including performance
issues, when you'd turn the approach around and let each client
Select your desired result on its own.
IOW, either use "Select ... Into Cursor xy" to get a local temp
cursor result for each client on demand or use a Local View.

gdstart = ctod(str(year(date()))+'.'+ str(month(date()),2)+'.'+ '01')
gdend=ctod(IIF(month(date())=12,str(year(date())+1),str(year(date())))+'.'+

It's almost always easier/better not to convert date types to character
and back, e.g.
gdStart = Date( Year(Date()), Month(Date()), 1 )
gdEnd = GoMonth(m.gdStart,1)

And I'd probably make them Local variables.



hth
-Stefan


"Patrick Tura" <patrick@xxxxxx> wrote in message news:9DA8E747-288C-4495-8398-06566DF2BEDB@xxxxxxxxxxxxxxxx
Hello guys,

I'm very sorry for a bit confusing in my description about closing a file..

well, this is my code;

SET ENGINEBEHAVIOR 70 && VFP 8.0 adjustment to run SQL-Select with grouping without problem
set safety off
set century on
set exclusive off
open database c:\kffmaindbf\client shared

SET DATE ANSI
public gdstart,gdend
gdstart=date()
gdend=date()
gdstart = ctod(str(year(date()))+'.'+ str(month(date()),2)+'.'+ '01')
gdend=ctod(IIF(month(date())=12,str(year(date())+1),str(year(date())))+'.'+ IIF(month(date())=12,'01',str(month(date())+1,2))+'.'+ '01')


*Collection Performance 2008.02.24

select kffstaff.gname,kffstaff.fname,book.staff_id,DATUM,KTO,sum(INN),TEXT ;
from book,biodata,kffstaff ;
nowait ;
where book.client_id = biodata.client_id ;
and biodata.B = "B" ;
AND book.staff_id=kffstaff.staff_id ;
and KTO='Cust';
AND text= 'Payment' ;
AND datum >=gdstart ;
AND datum <=gdend ;
AND kffstaff.position='Collector' ;
group by book.staff_id ;
ORDER BY book.inn descending INTO table c:\checker_dbf\cperformance

I have this code compiled into an exe. I run in our server on schedule and the result of this will produce 'c:\checker_dbf\cperformance.dbf'

This freetable is viewed in a grid from other users thru a vfp form in the network to see the figures of their performance. So this file will be open from time to time.
So when the above code is run, it cannot overwrite 'c:\checker_dbf\cperformance' if they are still open.

At the same time, I wanted to re-run this code every hour to keep the figures updated in the c:\checker_dbf\cperformance.dbf to make the users see the result of what they are doing.

As far, as I can see, my problem is how to close the open 'c:\checker_dbf\cperformance'. Maybe I need to use low level command but I don't how to do it.

Assistance please...Thanks in Advance..

/patrick



"Patrick Tura" <patrick@xxxxxx> wrote in message news:9C6F6992-9DBC-4BBA-B0C4-484C4AFDE293@xxxxxxxxxxxxxxxx
Hi!

I have a freetable that is open by more than one users to look at result of thier performance.

I wanted this table to be updated every hour in our server but however, if somebody is keeping this freetable file open my sql query that will save and update the result into freetable cannnot overwrite the .dbf file while it is open.
cannot overwrite freetable file(.dbf)

I need to close this freetable before starting my sql-query to be able to update the freetable every hour...

Anybody, can help me.

Our server is Windows Server 2003. I have my foxpro sql-query prg running on schedule...

Thanks.

/patrick



--
|\_/| ------ ProLib - programmers liberty -----------------
(.. ) Our MVPs and MCPs make the Fox run....
- / See us at www.prolib.de or www.AFPages.de
-----------------------------------------------------------

.



Relevant Pages

  • Re: What better FTP client is there?
    ... I think that the "allow overwrite" ability is a function of your FTP ... not of your FTP client. ... What are you using as your FTP server? ... any influence of that server. ...
    (alt.os.linux.suse)
  • Re: What doesnt lend itself to OO?
    ... >> proxy and instructs the server to constuct the real object. ... rather than client code. ... If 'clock' is instantiated in the server, ... > for the server interface at the OOA level. ...
    (comp.object)
  • This is going straight to the pool room
    ... or not the client has privilege to do what they're trying to do, ... The server environment is this: ... 3GL User action Routines that Tier3 will execute on your behalf during the ... Routine Name: USER_INIT ...
    (comp.os.vms)
  • [Full-Disclosure] R: Full-Disclosure Digest, Vol 3, Issue 42
    ... Full-Disclosure Digest, Vol 3, Issue 42 ... SD Server 4.0.70 Directory Traversal Bug ... Arkeia Network Backup Client Remote Access ...
    (Full-Disclosure)
  • Re: What doesnt lend itself to OO?
    ... > rather than client code. ... no way to do that without also touching the object with clock semantics ... will not encapsulate both clock semantics and network semantics. ... The server can do whatever it wants ...
    (comp.object)