Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Temporary tables in local hard disk
Message
From
23/10/2000 00:49:44
Cindy Winegarden
Duke University Medical Center
Durham, North Carolina, United States
 
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00432564
Message ID:
00432731
Views:
20
Alex,

So the data needs to be "private" for each user, but you did not say that it needs to persisit beyond a particular session. Why would a cursor (based on a "template" table which is stored on the network) not be suitable?

You wouldn't ever have to be sure that the table was there or that it was zapped after the last use.


>Hi Cindy,
>
>I'll quench your curiosity... It's for the invoicing part of the app I'm working on.
>
>My client sends out invoices and receives payments. Sometimes, one payment covers several invoices, sometimes a partial payment is to be applied PROPORTIONALLY to several invoices.
>
>For example, if we have two invoices, for $45 and $90 and we receive a payment of $60, $20 go to the first invoice, and $40 to the second.
>
>To make things REAL interesting, the user should be able to see all these invoices in a grid (like quickbooks), and over-ride the way the payments are applied (again, like quickbooks).
>
>Since I haven't been able to find a way to base a grid on an array or some ephimere structure, I decided that a temporary table should do.
>
>Now, why on the local harddrive? Because that takes care of segmenting the application. If several people want to enter payments at the same time, I don't have to worry about the logic to keep each user's temporary data separate from the other because it's kept in completely separate places.
>
>So far, things seem to be working. I managed to figure out where in the business object to stick the logic to create the temporary table. Now all I have left is writing the rest of the logic for the form to work as it's supposed.
>
>Kinda like: how do you sculpt an elephant? Well, you take a huge block of marble and you remove everything that doesn't look like one...
>
>Thanks for asking!
>
>Alex
>
>
>>Alex,
>>
>>I can't get past wondering why you're needing a table on the hard drive. There was one of these "template tables" in an application I inherited and the first thing I did was to put the template on the network and use AFIELDS() and CREATE CURSOR FROM ARRAY... to make a cursor from the table. The resulting cursor was writeable too!
>>
>>What that doesn't allow for is a particular batch of data that persists from session to session. If you're using ODBC you could use an offline view.
>>
>>But of course none of my curiousity helps you with your question! ;-)
>>
>>
>>
>>
>>>I need to create temporary tables.
>>>
>>>I think I was able to set up a business object that will bring up a cursor based on a free table that lives in the local hard disk.
>>>
>>>Now, the hard part is to decide where to put the code for actually CREATING a free table on the fly if it doesn't exist or actually zapping the table if it does exist.
>>>
>>>I'm considering the business object's init method but am not 100% sure about this.
>>>
>>>Ideas, as usual, are more than welcome!
>>>
>>>THanks!
>>>
>>>Alex
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform