NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Bruce on August 08, 2008, 07:15:31 AM

Title: Inserting to SQL : Browse doesn't start on newly inserted record
Post by: Bruce on August 08, 2008, 07:15:31 AM
A while back there was a thread, possibly more than one, requesting that after inserting a record, to a SQL backend, the browse should highlight the most recently inserted record.

The reason it doesn't work is because if you are using a server-side auto-incrementing key, then immediately after the insert the auto-incrementing-key-field is unknown.

We solve this (in version 4.31 PR10 and later) by doing an immediate SET & PREVIOUS - which will work almost all the time except when 2 users add a record "at the same time" and by "at the same time" I mean within a few thousandths of a second of each other.

There is a file driver solution documented here
http://www.softvelocity.net/community/blogs/clarion_6_tipstricks/archive/2006/03/09/701.aspx
But it only applies to build 9051 and alter, and I'm not having much joy making it work in my current Clarion build (9058) with MsSql 2000.


Cheers
Bruce