NetTalk Central

Author Topic: Still battling with SQL identity fields...and loosing  (Read 3274 times)

Neil Porter

  • Jr. Member
  • **
  • Posts: 88
    • View Profile
    • Email
Still battling with SQL identity fields...and loosing
« on: March 05, 2009, 04:02:59 AM »
I have a NetWebForm that updates records in my Jobs table. My jobs table has a child browse showing related records in my JobParcels table. These tables are related using a JOBID field in each table. JOBID in the jobs table is an Identity field. My dictionary is set so that my table has the EmulateAutoNumKey option set to true, and my JOBID field has AutoNumber = 1,1, and IsIdentity = 1

For debugging purposes I'm displaying my JOBID in my form. If I tick the Prime Auto Inc if necessary box my JOBID field DOESN'T get primed, and any child records that I add to JobParcels are orphaned as you would expect. If I tick the Prime Auto Inc even if not necessary, my JOBID is primed, and I can sucessfully add related child records, fantastic ;D

Now the bad news, if I leave the Prime Auto Inc even if not necessary box ticked, and I get any kind of validation errors occuring on the form, reminding me to enter a mandatory field, etc. I can't save the job, because I get Duplicate Key error at the top of my form  :'(

Has anybody managed to get this to work, or is it just me doing something silly? This is driving me mad.

I'm using Clarion 6.3 9059 with NetTalk 4.31 PR 32 and MSSQL 2005.

TIA

Neil Porter

Clarion 11.0.13244
NetTalk 11.04