Miscellaneous FAQ

PFXplus SQL runtime error

If you reindex a Mark 5 file while concurrently adding new records to it, you may see a "Violation of PRIMARY KEY constraint" error. This is caused by a problem in the PFXplus SQL runtime where under certain circumstances a recnum error can occur. Please contact us for a patch release of the runtime that fixes the problem. Note that the problem affects all SQL runtimes, but not Mark 1-4 files.

Can I use a different Runtime version to my Development License version?

Powerflex Corporation does not guarantee the compatibility of mismatched versions of the Development Licence and Runtime Licences. Support is not provided under this circumstance. We do guarantee compatibility between matching versions.

Can I run a PFXplus program on the Internet?

Yes you can. Check the article Put your PFXplus programs on the Internet for an example of a CGI interface based on a Perl wrapper, and download the code samples used in the article.

What is the maximum data file size limit in PFXplus?

There is virtually no limit on the file size PFXplus Version 5.0 for Windows, UnixWare and AIX can process. There is a limit on the number of records per file.

Btrieve files created by version 5.x or 6.x are limited to a file size of 4 GB. Files created by version 7.x are of unlimited size.

What is the maximum number of records limit in PFXplus?

PFXplus proprietary database can handle very large data files. Currently, there is a limit of about 2 Gigabytes of records per file (PFXplus 5.0, Mark 1 to 3 files). We tested up to 30 million records, but we know of customers with approximately 40 million records.

What is the maximum record length in PFXplus?

The following descriptions apply to DAT files (Mark 1 to 3): The Record Length is the number of bytes of available space for field data. The permissible range is 6 to 16384 bytes. Depending on the length there may be some wastage. Records shorter than 256 bytes are packed (as many as will fit) into a 512byte buffer. Longer records are rounded up to a multiple of 128 bytes.

With Btrieve, the record length for an uncompressed file is limited to approximately 4 KB. For a compressed file, the limit is 16 KB.

What is the limit on the number of external parameters?

There is a known limit on external parameters of 15. There are many ways to get around this limitation, including passing an array of values as an argument or a delimited string.

What is the limit on the number of fields in a record?

The Number of Fields can be from 1 to 255. All file types support an additional field 0 (RECNUM), which represents the record number.

Why doesn't the Mark 4 option appear in PTFSE File structure editor?

In the case where the Mark 4 option is not available in the File Structure Editor, this is most likely due to Btrieve for MSDOS or Windows (depending on which runtime is run) not being installed on the workstation.

How do I make a file opened in a Global module visible to all programs and modules?

To ensure a file is seen across all programs and modules use the code:

open filename
filename \exported=0
filename \openDepth=-1

When I open a file with the OMREADONLY flag the file is locked if a REREAD is done on another file. Should not the OMREADONLY file be excluded from the lock?

Using the OMREADONLY flag in conjunction with an OPEN statement causes the file to be opened in Read-Only mode. This does not exclude the file from locks as does the FILE_MODE file READ_ONLY statement. The online help on the OPEN statement offers a full explanation of OMREADONLY.

When compiling with the /G switch we get an error message that there are "too many symbols for debugger evaluator". How can we overcome this?

The limit applies per module, so you could overcome the problem by breaking your code to modules.

What is Error 4?

Error 4 means that the operating system has given an error code to PFXplus, which has then reported the error. It means that there is a problem either with the operating system, the LAN, or hardware. We have never traced an error 4 to PFXplus.

In the majority of cases we have found that is had been a network problem, for example a network card producing faulty packets, etc.

Why is Error 51 - cannot update without a Lock occurring?

Error 51 occurs where there has been an attempt to update a file, which is not locked, and the configuration item bLockRequired is set to 'Y' in the PFX.INI file (this is 'Y' by default in PFXplus version 5.0).

In the interests of multi-user safety, we suggest that you take a look at the line(s) of code where the problem is occurring; most likely somewhere along the line, there is a save to a file(s), which is not locked. See article, for further information on multi-user programming.

Can I have configuration items set in my registry and in my PFX.INI in PFXplus version 5.0?

It is possible to have registration details and configuration items set in your PFX.INI file and in the registry in PFXplus version 5.0. Whether the ones in your PFX.INI file get processed, depends on whether you have 'Process Configuration File' set in the registry. If this is set, then PFXplus will process the registry first then process the PFX.INI file. This means that the configuration items set in the registry are overwritten by items of the same name set in the PFX.INI file.

If 'Process Configuration File' is not set, then only the configuration items set in the registry will be processed, (unless of course the program is compiled or run with a /s switch specifying a Configuration file).

How can I change my registration details in PFXplus version 5.0?

To change you registration details in PFXplus version 5.0 in the registry, you can reinstall your PFXplus software and re-enter the registration details when prompted, or alternatively you can run Regedit.exe and modify the registry directly.

Why am I getting Index errors and data loss on my Windows system?

If you are experiencing lost data or damaged data files, the need for frequent re-indexing, and errors 20, 21, 22, 23 and 28, we recommend that you make the changes described in our Technical Bulletins as soon as you see any of these problems, or even before you see them.

What if the indexes for data files supplied with my PFXplus installation appear to be corrupted? I am using a non-standard collating sequence.

When using any non-standard collating sequence, all data files supplied with a PFXplus installation should be reindexed before you can successfully run any of the programs that use them.

What if 'Out of Memory' error 10 occurs when re-indexing?

When physical memory + virtual memory (or swap space) is more than 2 Gigabytes, PFXplus versions prior to 4.40 report a negative number and therefore an out of memory error. The short-term solution is to decrease the amount of swap space on the server, so that the sum of the swap space + physical memory is less than 2 Gigabytes.

Alternatively, you can set the variable $MAXIMUM_MEMORY to 512 MB, before you do the reindex command. The initial value for $MAXIMUM_MEMORY is set in the iMaximumMemory configuration item.

PFXplus versions 4.40 and later do not report this error.

How do I ensure that my code is Multi-user safe?

To ensure that your code is multi-user safe, you need to perform the correct file locking and unlocking procedures. Have a look at the article Multi-user Programming for more details.

Checklist for Index errors: Error 22, Error 21, and Multi-user Timeout errors: Error 19

If you are experiencing consistent errors 22, 21 and 19, we recommend that you check the following:

1. Is there a resident virus checker? If so, try removing it from each workstation and see if this makes a difference. Some virus scanners can cause problems.

2. If you are running the PFL3 runtime, check the number of file handles in your CONFIG.SYS or CONFIG.NT- these should be set to 150 or more.

3. Ensure that every recommended change in the Technical Bulletin has been successfully performed. Check the way the programs are written, are they multi-user safe? Have a look at the Multi-user programming article.

4. Check that you are running in multi-user mode by writing and running this small program:

showln multiuser
showln $userno

It should show True and 1 on first computer, True and 1001 on the second,... Check that you have bMultiUser in your PFX.INI file set to "Y". (Unless is it set to "Y" by default).

5. CPU-intensive applications running at the same time as your PFXplus application can cause problems. Check for anything running in the background and whether it may be causing any problems. For example, a program called Real Juke Box (music player) has been found to cause problems.

6. Check the software and make sure you are on all of the latest service packs.

7. Check which protocol you are using - MS networking and TCP/IP (and Netware if you want it) are recommended.

8. Look at the 4 basic areas which could cause index corruption, namely:
- Network
- Hardware, such as power supplies, network cards, cabling, any unreliable equipment. Try taking machines off the network and adding them back slowly to try to narrow it down.
- Software - check it is multi-user safe, see above
- Users - check whether anyone is rebooting inappropriately (this has been known to happen)

9. If the multi-user timeout error is occurring during periods of heavy processing, then:
- If you have slow machines, you need to speed up the system (a system is only as fast as its slowest machine), or
- You can increase the configuration items iLockRetry or iLockTimeout in the [PFL] section of your PFX.INI file.

What causes a Linker error when using PFX C-lib?

When running PFX C-lib, the relevant library is provided in a COFF format. If you need other format (for example OMF for Borland), remember to convert the library with the relevant utility (i.e. COFF2OMF.EXE for Borland).

How can I create a demonstration only version of my PFX application?

Your PFX application can be executed as a demonstration only application by using the Demonstration Execute Only Licence (DEOL). This licence decreases the possibility of misuse of your software and provides you with an opportunity to advertise your message on a pop-up form, which appears every 5 minutes while running the demonstration application.

What documentation can I use to learn more about PFXplus?

Programmers using PFXplus system get a comprehensive on-line manual included with their development kit. Non-current versions of PFXplus are delivered with a set of printed manuals (8 books). An extra set of these can be also purchased through our sales department.

How can I let my PFX program know which network user is running it?

If you need to customise your program depending on which network user is running it, use the GET_ENV statement to retrieve the user ID stored in an environment variable set for this purpose.

 //Example: in the network LOGIN script set
//where x has a different value for each user
//then in PFX program string usr get_env "PFXUSER" to usr switch usr     when "1"         ... run program with settings for pfxuser 1

Back to FAQ Page