Solved

Paradox Limits

Posted on 1997-11-19
2
775 Views
Last Modified: 2008-03-06
I am working on a project that is is sharing Paradox (v. 7) data between two applications.  There is many tables with various physical files.  We are running into memory problems when trying to run both applications at the same time.  We always get a Memory error on a specific table.  My guess is we are hitting one of the internal limits of Paradox, such as open tables per system or open physical files.  Does anyone know of a utility that I can use to tell me how many tables/files are open while running an
application.  If there is not a utility, is there another way for me to obtain this info?

0
Comment
Question by:gjbaker
2 Comments
 
LVL 3

Accepted Solution

by:
d4jaj1 earned 100 total points
ID: 1025556
Unfortunately, there isn't a utility to display locks of ALL tables at one time, only a single table. You can use the 'Display Lock' command from the Paradox menu. I know this is tedious, but I thought of a better way.

You could loop through your Alias for tables, and once found - use a TCursor to get the current locks, append the lock info to another table (say CurrentLocks.db) and display them in a custom form.  The code below gets the Lock info;

method pushButton(var eventInfo Event)
var
  tc TCursor
  tv TableView
endVar

; Add your code to loop through all the tables in your alias here

if tc.open("Orders.db") then  
  tc.enumLocks("OrderLck.db")  ; store Orders.db locks in OrderLck.db
  tv.open("OrderLck.db")       ; open OrderLck.db
else
  msgStop("Stop!", "Can’t open Orders.db table")
endIf

; Once finished appending the records, display the in a tableview or a custom form.
endMethod

As for Paradox limits, this list outlines the number of bytes each Paradox field type consumes in a record structure.  Note that this is the space taken up in the .DB file itself, not in any ancillary files, such as .MB's.

   Data Type              Bytes
   -----------------------------------------------------------
   Alphanumeric         1 byte per character, up to 255
   AutoIncrement        4 bytes
   Binary (BLOB)       10 bytes + 1 per char. in Size (0 - 240) [1]
   Bytes                       1 per character, up to 255 max.
   BCD                       17
   Currency (Money)    8
   Date                        4
   Formatted Memo  10 bytes + 1 per char. in Size (0 - 240)
   Graphic                 10 bytes + 1 per char. in Size (0 - 240)
   Memo                   10 bytes + 1 per char. in Size (1 - 240) [2]
   Logical                   1
   LongInt                   4
   Numeric (Number)  8
   OLE                      10 bytes + 1 per char. in Size (0 - 240)
   SmallInt                 2
   Time                      4
   TimeStamp            8

Limits:
   Maximum Field Count        :  255 fields
   Maximum Blocks per table :  64K
   Maximum Block Size          :  32K characters
   Max Record Size, unkeyed :  Current block size - 6 bytes [3]
   Max Record Size, keyed     :  (BlockSize - 6) / 3, rounded down to the nearest block size. [4]

Footnotes:

 [1]  All blob fields contain a 10-byte pointer to the .MB file, which indicates where the "rest" of the field value can be  found.

 [2]  Unlike other "blob" data types, memos require at least one character of the memo to be stored in the .DB file, for compatibility with Paradox for DOS.

  [3]  The default block size is saved in IDAPI.CFG.  To change the default, run the Configuration Utility and then change the Tables, Paradox, Block Size setting. The default is 2048 and can be increased in increments of 1024 up to 32K.

   6 bytes of this value are reserved for internal pointers.

 [4]  This stems from the way Paradox records key values, which go into a .PX file that is very similar to a table.  The size of the key cannot exceed 1/3 of the table's block size; otherwise, Paradox tries to increase the block size.

 When performing calculations, be sure to take the 6-byte pointers into account.

The only 'memory' resrictions to tables open at a time are determined by the memory you have & the Stack/Block size configuration in the IDAPI.CFG file.

Finally, I doesn't sound like a problem with Paradox internal limits since 1) I have run two copies of P7 over the network from the same machine, aliases, and tables with no problem and 2) you stated it only happenes to this table.  Make sure your PC & network can handle the amount of data you are trying to pass, e.g., it you are running an enifcient query, this could bring your PC and network to a crawl.  Also, make sure the table isn't corrupted itself.  If the table isn't corrupt & your sure the network is good, the example I gave should work (at least well enough to let you know you Do/Don't have too many tables open at a time)

Any questions, just add a comment.

Good Luck!

Jay
0
 

Author Comment

by:gjbaker
ID: 1025557
I'm sorry I didn't explain my error correctly, we always get a memory error on a table (but it can be ANY table).  I found in some, Borland technical information regarding internal limits of BDE, that says that Paradox has as limits of:
127 Tables open per system
512 Open Physical files
We have over 100 tables between the two applications.  Some of the tables are shared.  Counting the physical files we have well over 500.  Do you think we shoulld change to a real database such os Oracle?
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction: I have seen many questions on EE and elsewhere, asking about how to find either gaps in lists of numbers (id field, usually) ranges of values or dates overlapping date ranges combined date ranges I thought it would be a good …
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now