`
SQL Related Articles: MSSQL Identity - autonumber template 2004-05-08 -- Stephen C. Mull Newsgroups: softvelocity.clarion.databasedrivers,softvelocity.public.clarion6 Wrote this template this morning, needed it for a project and decided to share it with everyone. The purpose of this template is to easily populate against any procedure where data entry is performed (Form, EIP Browse, etc.) and allow the programmer easy access to the identity value that is populated by the SQL backend. Usage is easy, just populate any data entry procedure, specify the target table name as defined in your Clarion Dictionary, and specify the corresponding target table name as defined on your MS-SQL 2000 Server. That's about it, the template takes care of the rest. There are a few small caveats you may need to address regarding columns marked required, but no big issue to prime these. This template was designed and tested in C6 against an MS-SQL 2000 db. It makes use of IDENT_CURRENT. It is thread safe, and *should* also be compatible with C55, though I have not tested it yet. It is NOT compatible with MS-SQL7, though it could easily be changed to create a version that does. I may change it to support both versions as another popular SQL template does. I have only performed limited testing, please feel free to use and change. I only ask that if you make improvements, or any fixes that might be needed as a result of more in depth testing, please submit them back to me so I can evaluate and add to the finished product. Thanks! Stephen Mull You can download the template from http://www.icetips.com/ftp/clarion/mssql2kident.zip Printed November 21, 2024, 9:10 pm This article has been viewed/printed 35354 times. Google search has resulted in 747 hits on this article since January 25, 2004. |