FoxPro Programming
Packing Web-Connect System Files
Gravatar is a globally recognized avatar based on your email address. Packing Web-Connect System Files
  n/a
  All
  Feb 28, 2012 @ 01:46pm
Hi

I wonder what people are doing in regards to automating the packing and re-indexing of the Web-Connect system files. I usually just go to the admin page every so often and re-index the tables but I would prefer to automate this so it just happens. Would anyone like to share how they handle this?

Thanks,
Simon

Gravatar is a globally recognized avatar based on your email address. Re: Packing Web-Connect System Files
  Rick Strahl
  Simon White
  Feb 28, 2012 @ 07:44pm
Hi Simon,

There's no real good way to do this if you're running multiple instances because of VFP's requirement for exclusive use - if more than one instance is running tables can and usually are open in more than one session adn you can't re-index properly. In order to reindex/pack properly you need to put the server into single instance mode and then run the maintenance operations.

What I've done to automate this is to basically drive the requests remotely through HTTP. All the operations are accessible via HTTP links, so I use wwHttp to hit first the link to put the server into single instance mode


DO wwhttp
loHttp = CREATEOBJECT("wwhttp")

loHttp.cUsername = "ricks"
loHttp.cPassword = GetSystemPassword()

*** Put server into single instance mode (COM only)
lcOutput = loHttp.HttpGet("http://yourdomain.com/wconnect/admin/wc.wc?_maintain~MaintMode")

*** Now call a server link that runs your admin task
lcOutput = lcOutput + loHttp.HttpGet("http://yourdomain.com/wconnect/admin/wc.wc?wwMaint~ReindexSystemFiles")
lcOutput = lcOutput + loHttp.HttpGet("http://yourdomain.com/wconnect/admin/wc.wc?wwDemo~Reindex")

*** Put the server back into multiserver mode
lcOutput = lcOutput + loHttp.HttpGet("http://yourdomain.com/wconnect/admin/wc.wc?_maintain~Load")

Now compile that PRG into an EXE and fire hook it up to task scheduler for specific times when traffic is low or non-existant.

+++ Rick ---



Hi

I wonder what people are doing in regards to automating the packing and re-indexing of the Web-Connect system files. I usually just go to the admin page every so often and re-index the tables but I would prefer to automate this so it just happens. Would anyone like to share how they handle this?

Thanks,
Simon



Rick Strahl
West Wind Technologies

Making waves on the Web

from Maui, Hawaii
Gravatar is a globally recognized avatar based on your email address. Re: Packing Web-Connect System Files
  n/a
  Rick Strahl
  Feb 29, 2012 @ 08:39am
This is a workable solution for me.

Thanks,
Rick


Hi Simon,

There's no real good way to do this if you're running multiple instances because of VFP's requirement for exclusive use - if more than one instance is running tables can and usually are open in more than one session adn you can't re-index properly. In order to reindex/pack properly you need to put the server into single instance mode and then run the maintenance operations.

What I've done to automate this is to basically drive the requests remotely through HTTP. All the operations are accessible via HTTP links, so I use wwHttp to hit first the link to put the server into single instance mode


DO wwhttp
loHttp = CREATEOBJECT("wwhttp")

loHttp.cUsername = "ricks"
loHttp.cPassword = GetSystemPassword()

*** Put server into single instance mode (COM only)
lcOutput = loHttp.HttpGet("http://yourdomain.com/wconnect/admin/wc.wc?_maintain~MaintMode")

*** Now call a server link that runs your admin task
lcOutput = lcOutput + loHttp.HttpGet("http://yourdomain.com/wconnect/admin/wc.wc?wwMaint~ReindexSystemFiles")
lcOutput = lcOutput + loHttp.HttpGet("http://yourdomain.com/wconnect/admin/wc.wc?wwDemo~Reindex")

*** Put the server back into multiserver mode
lcOutput = lcOutput + loHttp.HttpGet("http://yourdomain.com/wconnect/admin/wc.wc?_maintain~Load")

Now compile that PRG into an EXE and fire hook it up to task scheduler for specific times when traffic is low or non-existant.

+++ Rick ---



Hi

I wonder what people are doing in regards to automating the packing and re-indexing of the Web-Connect system files. I usually just go to the admin page every so often and re-index the tables but I would prefer to automate this so it just happens. Would anyone like to share how they handle this?

Thanks,
Simon



© 1996-2024