persistentstorage/sql/TEST/t_sqlattach.cpp
changeset 29 cce6680bbf1c
parent 17 55f2396f6d25
child 55 44f437012c90
equal deleted inserted replaced
28:7a522c0700d3 29:cce6680bbf1c
   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.