ACC2000: Unexpected Behavior with Case-Sensitive ObjectsID: Q223202
|
In a Microsoft Access project, if you are connected to either a Microsoft SQL Server or to a Microsoft Data Engine (MSDE) that has a Sort Order set to "Dictionary order, case-insensitive," but has Unicode Collation case sensitivity turned on, you can see unexpected behavior. This behavior can occur with this type of server if you have objects that have the same name but that are spelled with all or some letters in a different case. In this scenario, you can see the following two unexpected behaviors:
Wrong Object Is Deleted
If in the user interface of the Access project, you try to delete the second or greater object of the same name, you find that actually the first object with that name is deleted. For example, suppose that you have the following tables listed:In an Access project file connected to this database, if you try to delete the table named "CATEGORIES," you find that you have actually deleted the table named "categories."categories Categories CATEGORIES
Table Appears to Contain No Data
If in the user interface, you try to open the second or greater table of the same name, you actually see the columns of the first table and they are empty. For example, suppose that you have the following tables listed:In an Access project file connected to this database, if you try to open the table named "CATEGORIES," you see that columns from the table named "categories" are shown instead and those columns are empty.categories Categories CATEGORIES
The Access project uses the sort order to determine which object to delete or open. The default Sort Order of both Microsoft SQL Server and Microsoft Data Engine is "Dictionary order, case-insensitive," meaning they ignore case when acting upon objects. Also, the default setting for Unicode Collation is case-insensitive. However, if during the setup of Microsoft SQL Server or MSDE, the Unicode Collation case sensitivity is turned on, but the Sort Order is left at the default of "Dictionary order, case-insensitive," it allows objects with the same spelling but with different case to exist on the server.
Using a server set up in this way, if you delete or open an object in the user interface of the Access project, Access finds the first occurrence of the object name that matches the spelling but does not try to match the case because it is using a dictionary sort order that is case-insensitive. Therefore, the wrong object could be chosen.
NOTE: This behavior does not occur if the server was set up with case-sensitive sort order as well as case sensitive Unicode collation.
The following steps show you how to work around these two behaviors. The steps use tables named CATEGORIES and Categories. You should replace these table names with the names of your tables.
Create Procedure DelTable
AS
DROP TABLE CATEGORIES
Return
Create Procedure ShowTable
AS
SELECT * FROM Categories
Return
Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.
Create Procedure makeTestTables
As
SELECT * INTO test FROM Categories
SELECT * INTO TEST FROM Employees
RETURN
Additional query words: pra upper lower title proper case
Keywords : kbdta AccessCS
Version : WINDOWS:2000
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: May 13, 1999