Using Foxpro from within Excel

B

Bob

Does anyone now how to incorporate the foxpro code "=sys(3050,1,100000) into
a VB macro so that the remote machines I am using restrict
foreground/background buffer memory. The following is taken from Microsoft's
own website....

"Using the commands COPY, APPEND, DELETE, INDEX, PACK or SQL-SELECT on a
large table in Visual FoxPro causes long pauses while the data is being
manipulated. The hard drive continues processing the data, but Visual FoxPro
seems to be inactive. This happens because computers that have large amounts
of RAM and are running Windows 95 or Windows NT give Visual FoxPro a large
amount of buffered memory to use. This memory is composed of RAM and physical
hard drive space. When FoxPro writes data into memory, large temporary files
are created. When they are written to the virtual memory (the hard drive),
that memory is always slower. Using a smaller amount of foreground buffer
memory with SYS(3050) makes Visual FoxPro use only the RAM memory, which is
faster. Reducing the foreground buffer size has eliminated the long delay in
most situations. "

I am using this in excel under the following code

Set db = CreateObject("CSQuery.Foxquery")

sql = "SELECT AVG(pv_gar_hed) AS av_gar_hed "FROM '" & main_dbf & "'
WHERE Val(trim(Time)) = " & time480 & " INTO TABLE '" & total_dbf & "'"
db.sqlQuerytext = sql
db.runquery (True)
If db.ErrorMessage <> "" Then
MsgBox db.ErrorMessage
'abort?
End If

Set db = Nothing

How do I incorporate the sys() function into this?

Cheers

Bob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top