NetTalk Central

Author Topic: Return from a form to the new record on the browse  (Read 5136 times)

terryd

  • Hero Member
  • *****
  • Posts: 759
    • View Profile
    • Davcomm
    • Email
Return from a form to the new record on the browse
« on: December 31, 2011, 12:46:55 AM »
Windows7 Ultimate 64bit Clarion8.8778 Nettalk5.44
In previous versions after creating a new record the called browse would display the record just created allowing the user to then add records to a child browse on the same browse screen.
Now the brecord displayed is always the3 first valid record.
Is there a way to ensure that the new record is the selected record?
Terry Davidson
Windows 10 64 bit/Windows7 64bit
Clarion 9.1.11529/Clarion10 12567
Nettalk 913
Nettalk 1015
StringTheory267/Winevent515/XFiles298/MessageBox239/Cryptonite186

terryd

  • Hero Member
  • *****
  • Posts: 759
    • View Profile
    • Davcomm
    • Email
Re: Return from a form to the new record on the browse
« Reply #1 on: January 01, 2012, 02:01:25 AM »
A point for completeness of information. I have converted the database from tps to MSSQL. I don't see why this could affect it but maybe it has.
Terry Davidson
Windows 10 64 bit/Windows7 64bit
Clarion 9.1.11529/Clarion10 12567
Nettalk 913
Nettalk 1015
StringTheory267/Winevent515/XFiles298/MessageBox239/Cryptonite186

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Return from a form to the new record on the browse
« Reply #2 on: January 02, 2012, 12:38:36 AM »
This did change recently, but unfortunately you're now stuck between a rock and a hard place.

The key problem is in identifying "the record that has just been added". So let me preface the rest of my answer by asking you what your Primary Key field is doing. Is it an Auto-number field? Is it set by the server or the client? (ie are you letting MsSql auto-number the field itself?)

cheers
Bruce


terryd

  • Hero Member
  • *****
  • Posts: 759
    • View Profile
    • Davcomm
    • Email
Re: Return from a form to the new record on the browse
« Reply #3 on: January 02, 2012, 02:07:09 AM »
Hi Bruce
The primary key field is an autonumber field using the standard primary/unique/autonumber setting from the dictionary. I haven't changed to MSSQL doing the autonumbering.
On the parent form I have set Prime autoinc even if not necessary
What I have done to alleviate the issue is to incorporate the child browse on a tab of the parent form which works fine, the only issue is the the browse that is called still doesn't show the new record on save but the child browse displays the related information even though a different record is highlighted (but I assume not actually selected)
Terry Davidson
Windows 10 64 bit/Windows7 64bit
Clarion 9.1.11529/Clarion10 12567
Nettalk 913
Nettalk 1015
StringTheory267/Winevent515/XFiles298/MessageBox239/Cryptonite186

terryd

  • Hero Member
  • *****
  • Posts: 759
    • View Profile
    • Davcomm
    • Email
Re: Return from a form to the new record on the browse
« Reply #4 on: January 04, 2012, 12:32:01 AM »
Hi Bruce
Any further information on what I can do.
Terry Davidson
Windows 10 64 bit/Windows7 64bit
Clarion 9.1.11529/Clarion10 12567
Nettalk 913
Nettalk 1015
StringTheory267/Winevent515/XFiles298/MessageBox239/Cryptonite186

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Return from a form to the new record on the browse
« Reply #5 on: January 04, 2012, 03:13:07 AM »
Are you really using build 5.44?
I assumed you were on 6 because this change only occurred in 6.
Cheers
Bruce

terryd

  • Hero Member
  • *****
  • Posts: 759
    • View Profile
    • Davcomm
    • Email
Re: Return from a form to the new record on the browse
« Reply #6 on: January 04, 2012, 05:44:36 AM »
Yes version 5.44 (see attached)
Additionally since at some stage I will be converting to Version 6 what will I need to look out for that has changed?


[attachment deleted by admin]
Terry Davidson
Windows 10 64 bit/Windows7 64bit
Clarion 9.1.11529/Clarion10 12567
Nettalk 913
Nettalk 1015
StringTheory267/Winevent515/XFiles298/MessageBox239/Cryptonite186

terryd

  • Hero Member
  • *****
  • Posts: 759
    • View Profile
    • Davcomm
    • Email
Re: Return from a form to the new record on the browse
« Reply #7 on: January 04, 2012, 10:00:44 AM »
Bruce
Additional information
I have the original program using the tps files. When I add a record there the browse called displays the added record.
The tables that the SQL version is accessing have exactly the same keys, indices etc as the original tps files.
It appears that the problem is definitely linked to the sql tables but the normal clarion apps (win32) that were converted and using the same tables have no problem at all.
Terry Davidson
Windows 10 64 bit/Windows7 64bit
Clarion 9.1.11529/Clarion10 12567
Nettalk 913
Nettalk 1015
StringTheory267/Winevent515/XFiles298/MessageBox239/Cryptonite186

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Return from a form to the new record on the browse
« Reply #8 on: January 05, 2012, 03:21:50 AM »
Yes, it's definitely related to SQL, and specifically related to the issue of determining "what record was just added". However this was (I think) working in most cases (specifically auto-numbered cases) in NT5. (In NT6 thre's a complication here, that I'm aware of, but that shouldn't be affecting you yet.)

So I think the first step is if you can make an example for me, with MsSql, duplicating the effect. Specifically make sure you get all the auto-numbering settings the same, and also the "advanced tab" settings the same.

I'll run that example through NT5 to see if I can spot the root of the issue, and then also in NT6 to see the effect there.

cheers
Bruce