Don't use "ID" as a fieldname in your User-Defined tables!

Be aware -

Re. public & casual view iMIS15.0.3 - don't include a field with fieldname 'ID' field in your User-Defined Tables. Because if you do, and you make these fields available for update in public/casual view, then your clients (and their members) will get the following error on update: "The variable name '@ID' has already been declared. Variable names must be unique within a query batch or stored procedure"

Running SQL Server Profiler across the update query confirms the system-generated variable @ID which conflicts with any identical fieldnames. This applies to those tables which are set up with the default Access Method=ID.

Hope this saves someone else from spending the best part of Sunday like I have trying to resolve this issue.

Bruce McPhail

www.KarapotiConsulting.com

 

 

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Best practices for UDTs

Bad things can happen with iMIS if you use the same field name in a User Defined Table that exists somewhere else in iMIS and/or one of your other user defined tables (especially if you have use for dues pricing checked).

Best practice is to always preface your field names with an abbreviation of the table name.  So assuming we were in the Name_Demo table and we needed a field called ID, we would create it as ND_ID (so the entire table/field name would be Name_Demo.ND_ID.  We would in theory do this with every field in the table (ND_SPOUSE, ND_ANNUAL_REVENUE, etc.)