The information in this article applies to:
- Microsoft FoxPro for MS-DOS, versions 2.5, 2.5a, 2.5b, 2.6, 2.6a
SYMPTOMS
When a FoxPro table (.DBF) file is included in a project and the resulting
application (.APP) file is encrypted, you may encounter problems such as a
distorted display, a hung computer, or a return to the MS-DOS prompt.
WORKAROUND
To work around this problem, use a third party product such as Cryptor to
encrypt the database, or use the techniques outlined in the following
article in the Microsoft Knowledge Base:
ARTICLE-ID: Q115476
TITLE : How to Encrypt FoxPro .DBF Files
STATUS
Microsoft has confirmed this to be a problem in the Microsoft products
listed at the beginning of this article. We are researching this problem
and will post new information here in the Microsoft Knowledge Base as it
becomes available.
MORE INFORMATION
Steps to Reproduce Behavior
- Start FoxPro for MS-DOS. Use the CUSTOMER.DBF table located in the
FPW26\TUTORIAL directory, and create a quick screen. Save the screen as
CUSTOMER.SCX.
- Open the CONTROL3.SCX screen located in the WINDOWS26\TUTORIAL
directory.
- From the File menu, choose Save As to save the screen under a different
name (MYCONTROL.SCX). Then close CONTROL3.SCX.
- From the file menu, choose Open to open MYCONTROL.SCX.
- Double-click the push buttons and change the Append prompt to Browse.
Select the valid code snippet check box to expose the associated code.
Then modify the code as shown below.
DO CASE
CASE act2 = 1
GO TOP
CASE act2 = 2
SKIP -1
IF BOF()
GO TOP
ENDIF
CASE act2 = 3
SKIP 1
IF EOF()
GO BOTTOM
ENDIF
CASE act2 = 4
GO BOTTOM
CASE act2 = 5
DEFINE WINDOW test FROM 15,0 TO 21,44
ACTIVATE WINDOW test
BROWSE IN WINDOW test SAVE NOWAIT WHEN showget()
CASE act2 = 6
CLEAR WIND
CLEAR READ
ENDCASE
SHOW GETS
RETURN 0
- Close the valid code snippet. From the system menu, choose Screen. Then
choose Screen Layout from the resulting popup. In the Screen Layout
dialog, activate the cleanup and procedure snippet. Then type this code:
PROCEDURE showget
SHOW GETS
RETURN
Then close the code snippet, and save the screen with the changes.
- In the Command window, type the following to start a new project file:
Create project Test,
- In the project file, choose Add to include the CUSTOMER.DBF table in the
project. Choose Add again to add the CUSTOMER.SCX screen. From the
system menu, choose Project. Then select "Set main" to make CUSTOMER.SCX
the main program.
- With CUSTOMER.SCX highlighted in the project, click the edit push button
to edit the screen. Then from the edit screen dialog, choose Add to add
MYCONTROL.SCX to the screen set. Choose the arrange push button to
arrange the two screens side by side. Then save the arrangement, and
close the edit screen dialog.
- From the sys menu, click Project. Then select project info. In the
project info dialog, select the encrypt check box so the resulting
TEST.APP file is encrypted. From the project file, choose Build. Then'
select Build Application to create the TEST.APP file. After completing
the .APP file, close the project file.
- From the system menu, choose Run. Then choose "Run application," from
the resulting popup. Select TEST.APP from the group of files.
- When the application is running, press the Next push button to see the
display update correctly. Then press the Browse button and move through
the data. You'll see that all records are fine. Press the Bottom push
button. You'll see a blank screen. try to use any of the push buttons
again. You will either see no records at all or garbage. After a short
time the computer may hang.
The problem does not occur if the .APP is built in FoxPro for Windows.
|