- Local time
- Today, 18:26
- Joined
- Feb 19, 2002
- Messages
- 46,818
JANR
I am in the process of converting a database where the developer used this technique liberally to SQL Server and I am not having fun. Every single query is broken because of this. My choice is to modify all the queries to put an actual alias for each column so the forms, reports, and code continue to work or to bite the bullet and just rename everything and save the next person from this hell. I'm leaning toward bringing a third-party find and replace tool and just fixing the d**m names once and for all.
Unfortunately, this is a good feature gone bad and should be categorized with table level lookups in the NEVER use category. If all the Caption were used for was creating labels on forms and reports, it would be useful. The problem is that it alias' the table names in your queries and the alias' are not obvious since you don't see any "AS" in the SQL string so if you are looking at a large query from an unfamiliar application, you can easily go batty trying to find where certain columns are coming from and why others are not being displayed but that's just the fun part. Who doesn't like that kind of challenge? Since the columns are essentially renamed, you're back to non-conforming field names in code and forms/reports. You may as well have used the spaces and special characters in the actual column names so as to avoid confusion.Why not use the Caption property of the tablefield, that is what it is there for?
Caption: Customer Name
FieldName: CustName
JR
I am in the process of converting a database where the developer used this technique liberally to SQL Server and I am not having fun. Every single query is broken because of this. My choice is to modify all the queries to put an actual alias for each column so the forms, reports, and code continue to work or to bite the bullet and just rename everything and save the next person from this hell. I'm leaning toward bringing a third-party find and replace tool and just fixing the d**m names once and for all.