persistentstorage/sql/SRC/Server/SqlSrvDatabase.cpp
branchRCL_3
changeset 9 667e88a979d7
parent 0 08ec8eefde2f
child 10 31a8f755b7fe
equal deleted inserted replaced
8:fa9941cf3867 9:667e88a979d7
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
   729 void CSqlSrvDatabase::DetachDbL(const TDesC& aDbName)
   729 void CSqlSrvDatabase::DetachDbL(const TDesC& aDbName)
   730 	{
   730 	{
   731 	TInt err = FinalizeAttachedDb(aDbName);
   731 	TInt err = FinalizeAttachedDb(aDbName);
   732 	if(err == KErrNone)
   732 	if(err == KErrNone)
   733 		{
   733 		{
   734 		TRAP(err, RemoveFromMapsL(aDbName));//ignore the error
   734 		TRAP_IGNORE(RemoveFromMapsL(aDbName));
   735 		}
   735 		}
   736 	else
   736 	else
   737 		{
   737 		{
   738 		__SQLLEAVE(err);
   738 		__SQLLEAVE(err);
   739 		}
   739 		}
  1562 	if(aSecureDb)
  1562 	if(aSecureDb)
  1563 		{
  1563 		{
  1564 		const TUint8* mapKey = NULL;
  1564 		const TUint8* mapKey = NULL;
  1565 		//Load database security policy, update the security policy map
  1565 		//Load database security policy, update the security policy map
  1566 		UpdateSecurityMapL(EFalse, aFileData, mapKey, iSecurityPolicy);
  1566 		UpdateSecurityMapL(EFalse, aFileData, mapKey, iSecurityPolicy);
       
  1567 		iSecureDbName = mapKey;//used in CSqlSrvDatabase destructor. 
  1567 		mapKey = NULL;//it is not used
  1568 		mapKey = NULL;//it is not used
  1568 		//Check that the caller has at least one of {Schema, Read, Write} policies.
  1569 		//Check that the caller has at least one of {Schema, Read, Write} policies.
  1569 		BasicSecurityPolicyCheckL(*iSecurityPolicy);
  1570 		BasicSecurityPolicyCheckL(*iSecurityPolicy);
  1570 		}
  1571 		}
  1571 	//Install user-defined functions.
  1572 	//Install user-defined functions.