Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Revisiting the 2 Gig limit
Message
 
To
11/05/2006 23:48:13
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01121213
Message ID:
01121456
Views:
20
Michel,

I know I am just thinking outloud, and my idea might have performance and or implementation issues, but as a thought:

What about using just regular files as memos? Something similar of what is used to store images, where instead of using a General Field you use a file name for it, this would be a little more complex, but the same idea, something like this:
 MyTable.DBF (No MEMO info required)
Numero       Title            AddDate             
1            My first tile    05/05/2005 11:11:11 
2            My second tile   05/05/2005 11:11:11 
3            My third tile    06/05/2005 12:11:11 
4            My fourth tile   06/05/2005 13:11:11 
5            My fifth tile    06/05/2005 14:11:11 
In the same folder where you have MyTable.DBF you create a subfolder of the same name, and you use it to store the files with a naming convention, for example: MemoName_PK

Then you have a function called, for example, getMemo (Simplified)
Function getMemo(tcPath, tcMemoName, tnPK)

	lcMemoFile = addbs(tcPath) + tcMemoName + '_' + transform(tnPK)
	if file(lcMemoFile)
		lcMemo = filetostr(lcMemoFile)
	else
		lcMemo = ''
	endif
	return lcMemo
endfunc
Now, lets say you need to put all the information together, you do something like:
lcPath = forceext(dbf('myTable'), '') && For the sub-folder has the same name as the table
Select myTable.*, cast(getMemo(lcPath, 'Notes', myTable.PK) as M) as Notes from myTable into cursor C_MyTable
You are not limited to one Memo per table, you can have as many as you need.
You still have a 2Gb limit in the cursor, but you will probably just get a subset of the table.
You do not need to use space for records without data in the memos

Anyways, is just a Friday thought, so probably is ill-conceived <g>
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform