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 BoardConvert To/From Paradox Topic   Print This     

Upgrading from Paradox 9 to 11

Upgrading from Paradox 9 to 11 in Convert To/From Paradox topic (part of our Corel Paradox / ObjectPAL Coding group).

Quick Search: Upgrading   Paradox   Upgrading Paradox   Upgrading Paradox 9  
kurz0470
 (Inactive)
Listowel, ON CA
A while back I wrote an application for a company in Paradox9. They have recently upgraded to Version 11. For the most part things "seem" to be going ok. They have downloaded the update script from Corel that is needed to convert some of the files however there is still one nagging issue that I just can't understand. This is a simple function that wrote to take an age value subtract it from the current year and then search for all users in the table that were born in that year. Everything worked great before the upgrade was attempted. Now it works for certain years but not others. For example I've tried searching for members that are 70 years old and it works fine but if I try 30 it will produce no results. I have confirmed that there are members in the database that are 30 years old so I can't figure out why I'm getting the empty result set. I'm not sure if this has any relavence but it seems like the higher ages (55 and above) will produce results but not the younger ages. I've tried creating a new form in version 11 and copying the code and saving the file but no luck.

If anyone has any ideas I would really appreciate it.
Thanks,
Rob

   dborn = Year(Today()) - Enter_Age.value

q = Query
ANSWER: :PRIV:Birthday.DB

Member.db | Member_ID | Last_Name | First_Name | Street | City |
| check | check | check | check | check |

Member.db | Province | Post_Code | Country | Born |
| check | check | check | check ../../~dborn |

EndQuery

executeQBE(q)
 Posted 15 years ago (Thread Starter)
Comment Quote
About kurz0470 -Collapse +Expand
Visit Profile
Inactive member.
Member does not subscribe to this thread.
Email Not Verified!
Once email is verified, we will review and approve the account.
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 #10722, 7 replies
Thread Started 9/27/2004 5:33:00 PM
View Counter=3055
Last Reply Posted 9/30/2004 2:48:00 PM)
Location=Listowel, ON CA 
Joined=18 years ago   MB Posts=15  
Most Recent Post
Rick Carter
Cincinnati OH USA

The dborn value is correct.

Maybe so, but Montana asked you what data type the variable is, and you never answered.

You could also try, in the BDE Configuration, setting FOURDIGITYEAR to "True" and "YearBiased" to "False," just to see if it helps.
Rick Carter
Chair, Delphi/Paradox SIG
Cincinnati PC Users Group
 Posted 15 years ago
Comment Quote
About Rick Carter -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 #10745 (Level 1.1)  Reply to 10722
Thread Started 9/30/2004 2:48:00 PM
View Counter=2
Location=Cincinnati OH USA  
Joined=18 years ago   MB Posts=518  
kurz0470
 (Inactive)
Listowel, ON CA
Thanks for the help but this one didn't work either. Same result as before, I get results for members over 65 but nothing else
 Posted 15 years ago (Thread Starter)
Comment Quote
About kurz0470 -Collapse +Expand
Visit Profile
Inactive member.
Member does not subscribe to this thread.
Email Not Verified!
Once email is verified, we will review and approve the account.
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 #10726 (Level 1.2)  Reply to 10722
Reply Posted 9/28/2004 9:48:00 AM
Location=Listowel, ON CA 
Joined=18 years ago   MB Posts=15  
kurz0470
 (Inactive)
Listowel, ON CA
I think you may be on to something with the date settings. The dborn value is correct. I've checked it numerous times. I tried doing the query again but this time instead of looking for the entire year (ie/ 1998) it looks for only the last two digits (ie/ 98). This works very well for now as temporary fix but in a few years they will want to look for members that were born after the year 2000. I will keep looking into this and see if the date settings on any of the machines have been changed.

Thanks
 Posted 15 years ago (Thread Starter)
Comment Quote
About kurz0470 -Collapse +Expand
Visit Profile
Inactive member.
Member does not subscribe to this thread.
Email Not Verified!
Once email is verified, we will review and approve the account.
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 #10736 (Level 1.3)  Reply to 10722
Reply Posted 9/30/2004 4:31:00 AM
Location=Listowel, ON CA 
Joined=18 years ago   MB Posts=15  
Tony M
 (Inactive)
Below assumes you want all fields in Member.db to appear in Birthday.db
Give this one a try, using a string instead of integer/number and combining the '..' of the date into the dborn variable.
dborn = ".."+string(Year(Today()) - Enter_Age.value)

q = Query

Member.db | Born |
check | ~dborn |

EndQuery
q.executeQBE(":priv:Birthday.db")
 Posted 15 years ago
Comment Quote
About Tony M -Collapse +Expand
Visit Profile
Inactive member.
Member does not subscribe to this thread.

Post ID #10723 (Level 1.4)  Reply to 10722
Reply Posted 9/27/2004 8:52:00 PM
Location= 
Joined=17 years ago   MB Posts=410   KB Comments=1  
Tony M
 (Inactive)
What is the value of dborn just prior to setting up the query?

dborn.view()

And what type is it? I'm kinda surprised that Paradox is allowing your version, since you are using a long or small int for dborn, and then using that as part of the text for the query '~'.

It may be that you have different settings on those workstations for the date type. Inspect them and make sure they match your settings on all of their systems. (I take it this still works on your system..?)
 Posted 15 years ago
Comment Quote
About Tony M -Collapse +Expand
Visit Profile
Inactive member.
Member does not subscribe to this thread.

Post ID #10727 (Level 1.5)  Reply to 10722
Reply Posted 9/28/2004 10:02:00 AM
Location= 
Joined=17 years ago   MB Posts=410   KB Comments=1  
Steve Caple
Steve Caple Company
Sacramento, CA
The easiest and most robust way around date settings problems is to use a date criteria table. You can create on the fly - and can have a routine to do that for you - a DATECRIT.DB with two fields, StartDate and EndDate, assign values directly or indirectly to those fields (indirectly would be to use a tCursor to put your EnterAge.value into one of the fields), and use one or both of the fields in your query.

Steve Caple
Programmer Analyst
Prestwood Software
http://www.prestwood.com

 Posted 15 years ago
Comment Quote
About Steve Caple -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.
About Steve Caple

Steve Caple I first saw Paradox in 1985 when a guy named Rick Albers came to demo Ansa's new 1.1 release to the Sacramento PC Users Group. The feeling was like going from WordStar to WordPerfect 3.0, a sense of freedom and power.

A long time dBase user had an evaluation copy he let me use for a few weeks.  Going from dBase to Paradox was like finding yourself walking WITHOUT your shoe laces tied together.  I was hooked; within a week I wrote my first useful Paradox DOS program.  It took a few evenings to put together a script to  generate a Basic Bulk Mail sort,  using a series of Paradox queries against a bicycle club Century ride mailing list.  It then used PAL to send text to the printer, printing it out in 5 digit Zip, three digit Zip, and miscellaneous by state groups, including group header labels and spacers on one-across stock  -  just tear it apart at the headers and give it to the mailing volunteers, and a job that used to take 20 people 4 or 5 hours could be done by 5 or 6 in a single hour.  

Later, Paradox for Windows version 5 added many needed structural and indexing and linking features, and as hardware caught up with the needs of a GUI environment it became a powerful database for small companies and divisions or branches within large corporations.  Despite some years of no real changes it remains one of the best products for that purpose.


Post ID #10741 (Level 1.6)  Reply to 10722
Reply Posted 9/30/2004 12:53:00 PM
Location=Sacramento, CA  
Joined=15 years ago   MB Posts=71   KB Posts=3  
Steve Caple
Steve Caple Company
Sacramento, CA
Here's an example:
   method SetDateRange(siAge smallInt)
var
tbl table
tc tCursor
siYr smallInt
dStart,
dEnd date
endvar

siYr = year(today()) - siAge

dStart = date(1,1,siYr)
dEnd = date(12,31,siYr)

tbl = create ":YOURAPPALIAS:DateCrit.DB" with
"StartDate" : "D",
"EndDate" : "D"
endcreate

tc.open(":YOURAPPALIAS:DateCrit.DB")
tc.edit()
tc."StartDate"
tc."EndDate"
tc.postRecord()
tc.endedit()
tc.close()

endMethod


YOURLIB.SetDateRange(Enter_Age.value)


q = query

DateCrit.DB | StartDate | EndDate|
| _start | _end |

Member.db | Born |
check | >= _start, <= _end |

endQuery

q.executeQBE(":priv:Birthday.db")

Steve Caple
Programmer Analyst
Prestwood Software
http://www.prestwood.com

 Posted 15 years ago
Comment Quote
About Steve Caple -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.
About Steve Caple

Steve Caple I first saw Paradox in 1985 when a guy named Rick Albers came to demo Ansa's new 1.1 release to the Sacramento PC Users Group. The feeling was like going from WordStar to WordPerfect 3.0, a sense of freedom and power.

A long time dBase user had an evaluation copy he let me use for a few weeks.  Going from dBase to Paradox was like finding yourself walking WITHOUT your shoe laces tied together.  I was hooked; within a week I wrote my first useful Paradox DOS program.  It took a few evenings to put together a script to  generate a Basic Bulk Mail sort,  using a series of Paradox queries against a bicycle club Century ride mailing list.  It then used PAL to send text to the printer, printing it out in 5 digit Zip, three digit Zip, and miscellaneous by state groups, including group header labels and spacers on one-across stock  -  just tear it apart at the headers and give it to the mailing volunteers, and a job that used to take 20 people 4 or 5 hours could be done by 5 or 6 in a single hour.  

Later, Paradox for Windows version 5 added many needed structural and indexing and linking features, and as hardware caught up with the needs of a GUI environment it became a powerful database for small companies and divisions or branches within large corporations.  Despite some years of no real changes it remains one of the best products for that purpose.


Post ID #10742 (Level 1.7)  Reply to 10722
Reply Posted 9/30/2004 1:03:00 PM
Location=Sacramento, CA  
Joined=15 years ago   MB Posts=71   KB Posts=3  

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 #10722 Counter
3055
Since 4/2/2008
Follow PrestwoodBoards on: 


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