Web Connection
Error on start
Gravatar is a globally recognized avatar based on your email address. Error on start
  Paulo Martins
  All
  Dec 30, 2021 @ 03:56am

I recently acquired the Webconnection product and started exploring it to learn more about how it works. For this I use the webconnection server and whenever I start any project, or simply the demo, the error that follows in the attachment appears.

Thanks you for your help...

Gravatar is a globally recognized avatar based on your email address. re: Error on start
  Rick Strahl
  Paulo Martins
  Dec 30, 2021 @ 11:00am

Not sure why that would fail.

What version of FoxPro are you running? It sounds like you might be running a version that doesn't support varchar? Web Connection requires FoxPro 9.

Stick this into a FoxPro PRG file and run it:

CREATE CURSOR TCacheTest ;
         (;
            Key varchar(236),;
            Content M,;
            XML   M,;
            Entered T,;
            Expires T, ;
            Accesses   I;   
         )
         *      INDEX ON EXPIRES TAG Expires
         INDEX ON KEY TAG Key 

What do you get?

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Error on start
  Paulo Martins
  Rick Strahl
  Dec 30, 2021 @ 12:02pm

Thanks

My version of Foxpro is 9 with SP2 and Hotfixes.

Running the code separately, I get the same error if the key field size is greater than 120, which called my attention to indexing and size limits, and I came to the conclusion that the problem has to do with using collate sequence different from Machine, in my case, GENERAL, would be mandatory.

So the solution is to change the instruction "INDEX ON KEY TAG KEY" to "INDEX ON Key TAG Key COLLATE "MACHINE"

Where can I or should I make this change?

![](https://support.west-wind.com/PostImages/2021/_vdw8BHWdIYztM7Fm.png)

Gravatar is a globally recognized avatar based on your email address. re: Error on start
  Rick Strahl
  Paulo Martins
  Dec 30, 2021 @ 12:59pm

Hmmmm... why would the collating sequence force varchar to use only 120 as a value? What sequence are you using? This would be the first I've heard of different size limits based on collating sequence. It's not like FoxPro supports multi-byte characters that might account for this?

You can make the change at the line of code where it fails in wwCache.prg.

update

Verified that this fails with anything but COLLATE MACHINE. So the fix is definitely to use this explicit setting.

I've updated the code in wwCache for the next update.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Error on start
  Paulo Martins
  Rick Strahl
  Dec 30, 2021 @ 01:29pm

It's not just varchar type, char type has the same limit.

The collating sequence I use is GENERAL by default, but the same goes for all collating sequences that support indexing with accented characters, almost all, except MACHINE.

Gravatar is a globally recognized avatar based on your email address. re: Error on start
  Rick Strahl
  Paulo Martins
  Dec 30, 2021 @ 02:04pm

It really makes no sense to me since it's not like FoxPro has double byte sequences that would account for half the length.

Good to know I guess.

Since I never touch the collating sequence I suspect that "MACHINE" is the default, even though docs seem to suggest it's "GENERAL".

© 1996-2024