equal
deleted
inserted
replaced
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. |