I.T. Discussion Community!
-Collapse +Expand
Paradox
Search Paradox Group:

Advanced
-Collapse +Expand Paradox To/From
To/FromCODEGuides
-Collapse +Expand Paradox Store
PRESTWOODSTORE

Prestwood eMagazine

August Edition
Subscribe now! It's Free!
Enter your email:

   ► MB LobbyCorel Paradox / ObjectPAL Coding BoardParadox Forms Topic   Print This     

Corrupt Form... Now what?

Corrupt Form... Now what? in Paradox Forms topic (part of our Corel Paradox / ObjectPAL Coding group).

Quick Search: Corrupt   Corrupt Form   Corrupt Form Now  
Lothar.K
-- --

Hello,

I run Paradox 9 SP4 with Win 10.

After some diagnostic errors that had me deeply concerned, I just discovered that problems I am having occur only when I try to modify a particular form. (Whew...)

That form has nothing on it other than about a dozen buttons, and I have to occasionally tweak some of the button code.

Starting earlier today, I found that whenever I clicked to save, or check syntax, for code on any of the buttons, Paradox would crash. Saving code on objects on other forms works just fine.

So, that would seem to indicate that the form in question is somehow corrupted.

I guess that I could create a new form, draw in those buttons, and cut & paste in their code.

But is there a better approach to correcting the problem I am describing?

Sincere thanks,

Lothar

 Posted 24 months ago (Thread Starter)
Comment Quote
About Lothar.K -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
Old Account!
If this is your account, sign in to activate web presence data (sign in quarterly to keep active). Alternatively, you can subscribe to our monthly eMag with a valid email address.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #16798, 9 replies
Thread Started 8/7/2017 9:16:51 AM
View Counter=977
Last Reply Posted 8/8/2017 2:24:07 PM)
Location=-- -- 
Joined=8 years ago   MB Posts=63  
Moderator
Steven.G
Myrtle Beach, SC USA

I have a much more complex form, with the same issues.. I got a backup (a specific restore point), and managed to add new stuff back, one piece a time, to get back to where I wanted it to be.. but now, I gotta try to copy/paste into a new form, and be done with this, once and for all..

no, I didn't make it.. I inherited it (sigh)

Steven Green
Senior Software Engineer
Paradox Support Specialist DOS/WIN

Prestwood IT Solutions
8421 Auburn Blvd, Suite 256, Citrus Heights, CA 95610
Office: 916-726-5675 | Fax: 916-726-5676 | http://www.prestwood.com
 Posted 24 months ago
Comment Quote
About Steven.G -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.

Post ID #16799 (Level 2) and Parent is 16798
Reply Posted 8/7/2017 9:26:42 AM
Location=Myrtle Beach, SC USA 
Joined=35 months ago   MB Posts=300  
rum
Frankfort, KY USA

FWIW,

I have run into this from time to time,  I have adopted the following strategy to mitigate the issue.

1.  Never save objects if PDOX has had a General Protection Fault during the current session, Exit PDOX and start over.

2. Always use a copy of your source code for development changes.

3. I compile my objects for each new release, but before I compile I do the following for each object

( I wrote a utility that creates my builds for me, so this is a step inside the builder utility)

create a backup folder for the current source (Each build has its own folder, disk space is cheap, my time cannot be replaced)

Overview: Documenting the application code

for each FORM or LIBRARY (other object types may be handled differently)-

copy the source object to the backup folder

SourceObject.enumSourceToFile(filenam..src,True)

Jeff

 Posted 24 months ago
Comment Quote
About rum -Collapse +Expand
Visit Profile
Membership pending.
Member subscribes to this thread with a verified email.
Member pending approval.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #16800 (Level 3) and Parent is 16798
Reply Posted 8/7/2017 9:38:31 AM
Location=Frankfort, KY USA 
Joined=26 months ago   MB Posts=88  
Moderator
Steven.G
Myrtle Beach, SC USA

yes, similar to what I do.. the first rule of data, always applies.. backups, backups, backups :-)

Steven Green
Senior Software Engineer
Paradox Support Specialist DOS/WIN

Prestwood IT Solutions
8421 Auburn Blvd, Suite 256, Citrus Heights, CA 95610
Office: 916-726-5675 | Fax: 916-726-5676 | http://www.prestwood.com
 Posted 24 months ago
Comment Quote
About Steven.G -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.

Post ID #16801 (Level 4) and Parent is 16798
Reply Posted 8/7/2017 10:30:54 AM
Location=Myrtle Beach, SC USA 
Joined=35 months ago   MB Posts=300  
Lothar.K
-- --

Hi to all,

Many thanks for the very useful comments.

In many ways, I am as sloppy as can be, but I am very disciplined about backups, so I am set for now.

All the best,

Lothar

 Posted 24 months ago (Thread Starter)
Comment Quote
About Lothar.K -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
Old Account!
If this is your account, sign in to activate web presence data (sign in quarterly to keep active). Alternatively, you can subscribe to our monthly eMag with a valid email address.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #16802 (Level 5) and Parent is 16798
Reply Posted 8/7/2017 12:36:53 PM
Location=-- -- 
Joined=8 years ago   MB Posts=63  
Lothar.K
-- --

Hello again,

This certainly may be obvious to others,  but I learned something about  backups, and will pass it along:

In a sense, my backups have been too good, or, more accurately, they were too frequent.

I had a corrupted form that I am now re-building from scratch, even though I have many backups.

That's because our backup schedule was generated to protect our rapidly changing data, rather than our (relatively) stable forms.

So, as it turned out, though we had many backups of the form, they were all generated after the corruption occurred, and we may have gone for months without becoming aware that the form had become corrupted.

Of course, even rapidly changing tables can also become corrupted, so I see now that I need to create more backup schedules for our tables and for our forms.

All the best,

Lothar

 Posted 24 months ago (Thread Starter)
Comment Quote
About Lothar.K -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
Old Account!
If this is your account, sign in to activate web presence data (sign in quarterly to keep active). Alternatively, you can subscribe to our monthly eMag with a valid email address.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #16804 (Level 6) and Parent is 16798
Reply Posted 8/8/2017 8:43:24 AM
Location=-- -- 
Joined=8 years ago   MB Posts=63  
Moderator
Steven.G
Myrtle Beach, SC USA

as you roll thru a gazillion backups, keep a few older ones.. a year old, 6 months old, etc.. sometimes you need an old one for data, sometimes for app pieces

Steven Green
Senior Software Engineer
Paradox Support Specialist DOS/WIN

Prestwood IT Solutions
8421 Auburn Blvd, Suite 256, Citrus Heights, CA 95610
Office: 916-726-5675 | Fax: 916-726-5676 | http://www.prestwood.com
 Posted 24 months ago
Comment Quote
About Steven.G -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.

Post ID #16805 (Level 7) and Parent is 16798
Reply Posted 8/8/2017 9:24:53 AM
Location=Myrtle Beach, SC USA 
Joined=35 months ago   MB Posts=300  
Lothar.K
-- --

Hi again,

As I am rebuilding that corrupted table, I am firing an error relating to a library that I created during the adminisatration of John Adams.


This is in the library:

method SelectPrinter(stPrnName string)

Var
  arPrinters, arPrnNames Array[] String
  stPrnInfo String
  i SmallInt
endVar
;******************************************************************
; NOTE: stPrnName must be EXACTLY the name in the Printer List
;******************************************************************

enumPrinters(arPrinters) ; Get a list of installed printers.
for i from 1 to arPrinters.size()
stPrnInfo = arPrinters
stPrnInfo.breakApart(arPrnNames, ",")
; After breakApart, array item 1 is the printer name,
if arPrnNames[1] = stPrnName then
if printerSetCurrent(stPrnInfo) then
endIf
endIf
endFor
endMethod

This in on the USES of the form:

Uses
  objectpal selectPrinter(stPrnName String)
endUses


and this is on a button on the form I am rebuilding:

Var
progVal string
lib1 library
stPrnName string
A,N smallInt
Q2 Query
LabelRPT, NameTagRPT Report
Label3tbl table
endVar

 progVal = prog

if not lib1.open(":DATA:selectPrinter.LSL")
  then
    errorShow()
endIf
stPrnName = "Smart Label"
lib1.selectPrinter(stPrnName)

But, the line just above fires Error "Unknown method name" on selectPrinter, but given that the library opens successfully, I am confused by the error.

Might you see the problem?

Thanks for any help,

Lothar

 Posted 24 months ago (Thread Starter)
Comment Quote
About Lothar.K -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
Old Account!
If this is your account, sign in to activate web presence data (sign in quarterly to keep active). Alternatively, you can subscribe to our monthly eMag with a valid email address.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #16807 (Level 8) and Parent is 16798
Reply Posted 8/8/2017 10:33:08 AM
Location=-- -- 
Joined=8 years ago   MB Posts=63  
Moderator
Steven.G
Myrtle Beach, SC USA

if you're rebuilding the form, the error could be bogus.. I remember a form I worked on recently, where it was throwing a "not in edit mode" error, but it was the 4th or 5th field down the line, all were getting changed, so it obviously WAS in edit mode..

Steven Green
Senior Software Engineer
Paradox Support Specialist DOS/WIN

Prestwood IT Solutions
8421 Auburn Blvd, Suite 256, Citrus Heights, CA 95610
Office: 916-726-5675 | Fax: 916-726-5676 | http://www.prestwood.com
 Posted 24 months ago
Comment Quote
About Steven.G -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.

Post ID #16808 (Level 9) and Parent is 16798
Reply Posted 8/8/2017 10:50:29 AM
Location=Myrtle Beach, SC USA 
Joined=35 months ago   MB Posts=300  
Most Recent Post
Lothar.K
-- --

Hi Steve,

I had thought that the error might be spurious, but just discovered that it was not...

In one of the Var-EndVar blocks, I had selectPrinter as a string. Removing that eliminated the error.

As always, many thanks,

Lothar

 Posted 24 months ago (Thread Starter)
Comment Quote
About Lothar.K -Collapse +Expand
Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
Old Account!
If this is your account, sign in to activate web presence data (sign in quarterly to keep active). Alternatively, you can subscribe to our monthly eMag with a valid email address.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #16809 (Level 10) and Parent is 16798
Reply Posted 8/8/2017 2:19:51 PM
Location=-- -- 
Joined=8 years ago   MB Posts=63  

Revive Thread!

Add a comment to revive this old thread and make this archived thread more useful.

Write a Comment...
Full Editor
...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.


Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P1251A1
Enter key:
Icon: A Post    Thread    Idea    Important!    Cool    Sad    No    Yes    Includes a Link...   
Thread #16798 Counter
977
Since 8/7/2017
Follow PrestwoodBoards on: 


©1995-2019 PrestwoodBoards  [Security & Privacy]
Professional IT Services: Coding | Websites | Computer Tech