Purpose:
2. Allow autonumbering on backend and autonumbering in CW dictionary so parent/child forms work

Target:
1. C5.5 B2, ABC Templates, 32 Bit MSSQL.

Credits:
1. Surf (Scott Ferret) from TopSpeed initially released a similar template for SA Anywhere
but it didnt allow setting Autonumbering in both the back end and CW.
2. Jim Kane took Surf's work one step further and modified ABFILE to work arround some
restrictions related to private attributes.
3. 4/16/2000 updated for c5.5 b2


To install:
MSSQL:
1. create a Database in MSSQL called Sql7test
2. In query analyzer run the script sql7test.sql twice - you may get drop errors 1st time.

CW:
1. put SQLAn.TPL in the template dir and register SQLAN.TPL
2. Put SQLAN.CLW and SQLAN.INC into libsrc
3. In ABFile.inc add two methods:
SetAutoIncDone	Procedure(BYTE pAutoIncDone)
GetAutoIncDone	Procedure(),BYTE
4. In ABFile.CLW add the code for the above two methods.
The source code is in ABFix.Clw

Sample Application:
1. Run NewAN - autonumbered on the back end and CW is quite happy with it.

To Use in Your app.
1. In MSSQL create an identity column for all tables you want autonumbered
2. In the CW dictionary, check autonumbering for the same tables as you usually would
3. Add SQLAN.TPL global extension to the app. SQLAN.INC/.clw in libsrc.
4. This assumes you have done the patching described above.

Jim Kane
Team TopSpeed