NetTalk Central

Author Topic: Prime Auto Inc for TPS file  (Read 3920 times)

MikeR

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
    • Email
Prime Auto Inc for TPS file
« on: February 09, 2015, 07:48:50 AM »
My old Clarion 6 app works well
just recompiled eventually in 9.1
prime auto inc doesn't work
I know this isnt a nettalk issue
but all the smart guys read this so ....
please point me in the right direction ?

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Prime Auto Inc for TPS file
« Reply #1 on: February 09, 2015, 08:12:26 PM »
It doesn't work in your NetTalk program, or it doesn't work in your Windows program?
I'm not aware of a problem with either case myself....

Cheers
Bruce

MikeR

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
    • Email
Re: Prime Auto Inc for TPS file
« Reply #2 on: February 09, 2015, 08:28:26 PM »
Its a normal windows program Bruce.
The key consists of 2 fields code and a number.
I have the number set as descending order 
and autonumber on
Where would i start looking to debug why its not getting the correct value.
I show the number on the screen but it always shows a 1
if I change the code to something that doesnt exists in the file the 1st record adds correct as a 1
but subsequent records (in fact all) new records are primed as 1 ?
 

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Prime Auto Inc for TPS file
« Reply #3 on: February 09, 2015, 08:31:20 PM »
ok - well I'd start by reading the auto-numbering code in ABFILE.CLW and then adding debugging as appropriate to see what is happening there.

Cheers
Bruce

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Prime Auto Inc for TPS file
« Reply #4 on: February 09, 2015, 08:34:57 PM »
>> I have the number set as descending order 

you've got the number as _descending_?
So auto-numbering goes from 2 billion down to 1?
Does the build in Autonumbering even do this? I've never tried descending autonumbering...

Personally I'd have predicted that this is completely unsupported. So it wouldn't surprise me that it fails.

I presume you've set the key to descending because you want to sort a browse with the most recent number forst and you (mistakenly) believe that browses actually make use of keys? (hint: they don't - keys are used for record identification in a database, not sorting.)
If you want the browse to sort a specific way then just set the sort order for the browse to be that way. Don't be hacking the key to do it.

cheers
Bruce

MikeR

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
    • Email
Re: Prime Auto Inc for TPS file
« Reply #5 on: February 10, 2015, 12:47:55 AM »
you have hit the nail on the head.

The autonumbering wheather the key was asending or descending used to work starting from 1
and then incrementing irrespective of the key order seq.
It no longer works that way.
In fact you cant add a autonumber key with a descending field in it.
But my very old app dev in clarion 6 you could.
I changed the order and everything works except my browse , but that I can fix.

Many thx for the help.