persistentstorage/sql/TEST/t_sqlattach.cpp
branchRCL_3
changeset 12 6b6fd149daa2
parent 11 211563e4b919
equal deleted inserted replaced
11:211563e4b919 12:6b6fd149daa2
   331 	//Attempt to read from the attached database and write to the main database
   331 	//Attempt to read from the attached database and write to the main database
   332 	err = TheDb.Exec(_L("INSERT INTO  a1(f2) SELECT a1 FROM db2.c"));
   332 	err = TheDb.Exec(_L("INSERT INTO  a1(f2) SELECT a1 FROM db2.c"));
   333 	TEST2(err, KErrPermissionDenied);
   333 	TEST2(err, KErrPermissionDenied);
   334 
   334 
   335 	//Attempt to detach database using DETACH sql statement directly.
   335 	//Attempt to detach database using DETACH sql statement directly.
   336 	//Executed only in release mode because the server will panic in _DEBUG mode
       
   337 #ifndef _DEBUG	
       
   338 	err = TheDb.Exec(_L("DETACH DATABASE DB2"));
   336 	err = TheDb.Exec(_L("DETACH DATABASE DB2"));
   339 	TEST2(err, KErrPermissionDenied);
   337 	TEST2(err, KErrPermissionDenied);
   340 #endif	
       
   341 		
   338 		
   342 	err = TheDb.Detach(KAttachDb2);
   339 	err = TheDb.Detach(KAttachDb2);
   343 	TEST2(err, KErrNone);	
   340 	TEST2(err, KErrNone);	
   344 
   341 
   345 	//Attempt to attach a database using ATTACH sql statement directly.
   342 	//Attempt to attach a database using ATTACH sql statement directly.