Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Temporary tables in a multiuser environment
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00180088
Message ID:
00180096
Views:
23
>I have a search screen that builds a temporary table which is displayed in a grid format in the screen that is called after the search screen. I would like to create a new table every time the user does a new search. If I don't create a new table, the following conflict occurs. If one user does a search the table holds the results of that search, then a second user does a search the table has the results of both searches. Is there a way to avoid this problem using only one table?
>
>The only solution I've come up is [complicated]

Seems to me that another solution would be to build a cursor or a view, rather than a temporary table. Is there a reason you're using a temporary table?

But the answer to your other problem is this: in macro substitution in FoxPro (this goes all the way back to FoxBase, as well), a period at the end of the variable name means concatenate the characters that follow when expanding. Believe it or not, if you had used &holdcctable..id, it would have worked, because the string ".id" would have been concatenated to the string in holdcctable.

But there's a better way than macro substitution for your problem, too. I suggest you read up on name expressions. "Use a name expression instead of macro substitution wherever you can." (FoxPro 2.6 help file, performance tips. Still applies as far as I know.) In your case the name expression would be ('holdres' + alltrim(cttable) ). The outer parentheses make it a name expression.
Rich Addison, Micro Vane, Inc., Kalamazoo, MI
Relax, don't worry, have a homebrew.
- Charlie Papazian, The New Complete Joy of Home Brewing
Previous
Reply
Map
View

Click here to load this message in the networking platform