Stomo73 11:12, 18 October 2007 (UTC)
// we have autoincrement in index so it should be unique // but just to make sure, we use 'while', instead of 'if' while(Myview.AtRow())
This is a bad habbit, I think. Use _ASSERT_DEBUG, if you're suspicious about the query result. But in your example, using 'while' suggests existing fatal error in the DBMS.
"TFileName QueryBuffer;" in DeleteFromDatabaseL().
Do you know any restriction on the length of the SQL statement? If not, do not use TFileName for that. Use TBuf<> if the statement is small (<256byte) or HBufC* if bigger.
Creating and using database is important for almost all application that need to save data on client. Symbian also supports flat file system through which we save and retrive data, but retrieving data from flat file is not much efficient. Creating and using database file is more efficient. Symbian support classes like RDbNamedDatabase and RDbStoreDatabase, to create database.
This article described use of RDbNamedDatabase to create database. The class CMyDBClass (in this article) illustrate how to use RDbNamedDatabase API to create database. Article is very useful to beginners.
--kamlesh sangani 15:34, 7 September 2009 (UTC)